def callable(obj):
        for klass in type(obj).__mro__:
            if "__call__" in klass.__dict__:
                return True
        return False


# --- stdlib additions
dataset/ETHPy150Open packages/psutil/psutil/_compat.py/callable/original