def METHOD_NAME(h1: T, h2: T) -> int:
    if isinstance(h1, int) or isinstance(h2, int):
        n1 = h1
        n2 = h2
    else:
        # convert hex strings to ints
        n1 = int(h1, 16)
        n2 = int(h2, 16)
    # xor the two numbers
    n = n1 ^ n2
    # count up the 1's in the binary string
    return sum(b == "1" for b in bin(n)[2:])