Returns the url to the parent endpoint.

def get_parent(self):
        """Returns the url to the parent endpoint."""
        if self.is_entity():
            return self.get_index_url(**self.default_kwargs_for_urls())
        elif self._parent is not None:
            resource = self._parent.rsplit('_', 1)[0]
            parts = self.default_kwargs_for_urls()

            if '{}_id'.format(resource) in parts:
                id = parts.pop('{}_id'.format(resource))
                parts['id'] = id
            return self.get_full_url(
                self.app.reverse(
                    self._parent, **parts
                )
            )