code: def load(f, module=None):
      
      if hasattr(f, 'read'):
          p_dict = yaml.load(f.read())
      else:
          with open(os.path.abspath(f), 'r') as fil:
              p_dict = yaml.load(fil.read())
  
      return from_dict(p_dict, module=module)
docs: Read a potential specification file and return a
      :class:`~gala.potential.PotentialBase` object instantiated with parameters
      specified in the spec file.
  
      Parameters
      ----------
      f : str, file_like
          A block of text, filename, or file-like object to parse and read
          a potential from.
      module : namespace (optional)