code: def parent(self):
          
          if self._parent is not None:
              return self._parent
  
          try:
              package = self.repository.get_parent_package(self.resource)
              self._parent = Package(package, context=self.context)
          except AttributeError as e:
              reraise(e, ValueError)
  
          return self._parent
docs: Get the parent package.
  
          Returns:
              `Package`.