def unbound_method_to_callable(func_or_cls):

    if isinstance(func_or_cls, types.MethodType) and not func_or_cls.im_self:
        return func_or_cls.im_func
    else:
        return func_or_cls
Adjust the incoming callable such that a 'self' argument is not required.
dataset/ETHPy150Open ralfonso/theory/theory/model/mpdutil.py/unbound_method_to_callable