code: def get_method_description(method):
      # type: (Callable) -> str
      
      try:
          try:
              line_no = inspect.getsourcelines(method)[1]
          except IOError:
              # Error reading the source file
              line_no = -1
  
          return "'{method}' ({file}:{line})".format(
              method=method.__name__, file=inspect.getfile(method), line=line_no
          )
      except TypeError:
          # Method can't be inspected
          return "'{0}'".format(method.__name__)
docs: Retrieves a description of the given method. If possible, the description
      contains the source file name and line.
  
      :param method: A method
      :return: A description of the method (at least its name)
      :raise AttributeError: Given object has no __name__ attribute