def METHOD_NAME(self):
    if self._session:
        self._session.METHOD_NAME()
    if self._repo:
        self._repo.erase()
    self._session = None
    self._repo = None
    self._globals = {}
    self._closed = True