<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parent(self):
 """Get the parent package. Returns: `Package`. """

        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