code: def getpath(element):
      
  
      if not hasattr(element, '__name__'):
          raise AttributeError(
              'element {0} must have the attribute __name__'.format(element)
          )
  
      result = element.__name__ if ismodule(element) else \
          '{0}.{1}'.format(element.__module__, element.__name__)
  
      return result
docs: Get full path of a given element such as the opposite of the
      resolve_path behaviour.
  
      :param element: must be directly defined into a module or a package and has
          the attribute '__name__'.
  
      :return: element absolute path.
      :rtype: str
  
      :raises AttributeError: if element has not the attribute __name__.
  
      :Example:
  
      >>> getpath(getpath)
      b3j0f.utils.path.getpath