code: def parents(self, resources):
          
  
          if self.docname == 'index':
              # The root has no parents
              return []
          parents = []
          parent = resources.get(self.parent)
          while parent is not None:
              parents.append(parent)
              parent = resources.get(parent.parent)
          return parents
docs: Split the path in name and get parents