def _getMethodNameInClass(method):
    if getattr(method.im_class, method.__name__, object()) != method:
        for alias in dir(method.im_class):
            if getattr(method.im_class, alias, object()) == method:
                return alias
    return method.__name__
Find the attribute name on the method's class which refers to the method.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/trial/runner.py/_getMethodNameInClass