For some reason, methods don’t play well with weakref, and need some kind of workaround that keep the weakref on the method’s instance instead of the method itself.
Returns a weakref to method. This weakref, unlike a normal weakref, will behave correctly with that method.