code: def get_dir_meta(fp, atts):
      
  
      # Attibutes are popped from deepest directory first
      atts.reverse()
  
      dirname = os.path.split(fp)[0]
      meta = dirname.split('/')
  
      res = {}
  
      try:
          for key in atts:
              res[key] = meta.pop()
      except IndexError:
          raise PathError(dirname)
  
      return res
docs: Pop path information and map to supplied atts