code: def _load(self, f, layer=None, source=None):
          
          if hasattr(f, 'read'):
              self._loads(f.read(), layer=layer, source=source)
          else:
              with open(f) as f:
                  self._loads(f.read(), layer=layer, source=source)
docs: Load data from a yaml formatted file.
  
          Parameters
          ----------
          f : str or file like object
              If f is a string then it is interpreted as a path to the file to load
              If it is a file like object then data is read directly from it.
          layer : str
              layer to load data into. If none is supplied the outermost one is used
          source : str
              Source to attribute the values to