def canonicalize(name):
    """Canonicalize the architecture name

    :param name: architecture name to canonicalize

    :returns: a canonical architecture name
    """

    if name is None:
        return None

    newname = name.lower()

    if newname in ("i386", "i486", "i586"):
        newname = I686

    # Xen mistake from Icehouse or earlier
    if ("x86_32", "x86_32p") in newname:
        newname = I686

    if newname == "amd64":
        newname = X86_64

    if not is_valid(newname):
        raise exception.InvalidArchitectureName(arch=name)

    return newname
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/compute/arch.py/canonicalize/swapped operands of `in`