def __get__(self, obj, objtype=None):
        # Invoked whenever this is accessed as an attribute of *another* object
        # - as it is when wrapping an instance method: `instance.method` will be
        # the ContextDecorator, so this is called.
        # We make sure __call__ is passed the `instance`, which it will pass onto
        # `self.func()`
        return functools.partial(self.__call__, obj)
Implement descriptor protocol to support instance methods.
dataset/ETHPy150Open potatolondon/djangae/djangae/db/transaction.py/ContextDecorator.__get__