def _make_bound_method(func, self):
    class Foo(object):
        def meth(self): pass
    f = Foo()
    bound_method = type(f.meth)

    try:
        return bound_method(func, self, self.__class__)
    except TypeError: # python3
        return bound_method(func, self)
:rtype: BaseModelFormSet[T <= BaseForm]
dataset/ETHPy150Open nltk/nltk/nltk/corpus/util.py/_make_bound_method--crossover with--dataset/ETHPy150Open JetBrains/python-skeletons/django/forms/models.py/BaseModelFormSet.__init__