parameters: (self, name)
docstring: The path is the list of names that leads to the searched name.
  
          :return list of Name:
docstring_summary: The path is the list of names that leads to the searched name.
docstring_tokens: The path is the list of names that leads to the searched name .
function: def get_path_for_name(self, name):
          """
          The path is the list of names that leads to the searched name.
  
          :return list of Name:
          """
          try:
              # The name may be an alias. If it is, just map it back to the name.
              name = self._aliases()[name]
          except KeyError:
              pass
  
          for path in self.get_paths():
              if name in path:
                  return path[:path.index(name) + 1]
          raise ValueError('Name should be defined in the import itself')
function_tokens: def get_path_for_name ( self , name ) : try : # The name may be an alias. If it is, just map it back to the name. name = self . _aliases ( ) [ name ] except KeyError : pass for path in self . get_paths ( ) : if name in path : return path [ : path . index ( name ) + 1 ] raise ValueError ( 'Name should be defined in the import itself' )