def _constructMethod(cls, name, self):
    func = cls.__dict__[name]
    if _PY3:
        return _MethodType(func, self)
    return _MethodType(func, self, cls)
Construct a bound method.
dataset/ETHPy150Open twisted/twisted/twisted/python/compat.py/_constructMethod