def issubtype(a, b):
    if issubclass(a, b):
        return True
    if issubclass(a, (tuple, list, set)) and issubclass(b, Iterator):
        return True
    if issubclass(b, (tuple, list, set)) and issubclass(a, Iterator):
        return True
    return False
A custom issubclass
dataset/ETHPy150Open blaze/blaze/blaze/compute/core.py/issubtype