def _make_bound_method(func, self):
    """
    Magic for creating bound methods (used for _unload).
    """
    class Foo(object):
        def meth(self): pass
    f = Foo()
    bound_method = type(f.meth)

    try:
        return bound_method(func, self, self.__class__)
    except __HOLE__: # python3
        return bound_method(func, self)
dataset/ETHPy150Open nltk/nltk/nltk/corpus/util.py/_make_bound_method