parameters: (self, method, callback=None)
docstring: __init__.
  
          @param method: Method to be referenced.
          @type method: method
          @param callback: Callback to be called when the method is collected.
          @type callback: callable
docstring_summary: __init__.
docstring_tokens: __init__ .
function: def __init__(self, method, callback=None):
          '''__init__.
  
          @param method: Method to be referenced.
          @type method: method
          @param callback: Callback to be called when the method is collected.
          @type callback: callable
          '''
          self.im_func = method.im_func
          try:
              self.weak_im_self = weakref.ref(method.im_self, self._dies)
          except TypeError:
              self.weak_im_self = None
          self.im_class = method.im_class
          self.callback = callback
function_tokens: def __init__ ( self , method , callback = None ) : self . im_func = method . im_func try : self . weak_im_self = weakref . ref ( method . im_self , self . _dies ) except TypeError : self . weak_im_self = None self . im_class = method . im_class self . callback = callback