def METHOD_NAME(self, receiver):
    ref = weakref.ref
    if hasattr(receiver, '__self__') and hasattr(receiver, '__func__'):
        ref = weakref.WeakMethod
        receiver_object = receiver.__self__
        weakref.finalize(receiver_object, self._clear_dead_receivers)
    return ref(receiver)