code: def close(self):
      if not self.active:
          raise Exception("session is closed")
      if self._run:
          del self._run
          self._run = None
      if (
          self._repo_path in Session.sessions
          and self in Session.sessions[self._repo_path]
      ):
          Session.sessions[self._repo_path].remove(self)
          if len(Session.sessions[self._repo_path]) == 0:
              del Session.sessions[self._repo_path]
      self.active = False
  
imports: import os
  import atexit
  import signal
  import threading
  from typing import Optional
  from aim.ext.exception_resistant import exception_resistant
  from aim.sdk.legacy.deprecation_warning import deprecated
  from aim.ext.resource.configs import DEFAULT_SYSTEM_TRACKING_INT
  from aim.ext.resource.tracker import ResourceTracker
  from aim.sdk.repo import Repo
  from aim.sdk.run import Run
label_desc: Use image node_id 7 for calling the Session obj's underlying member method code with example usage: obj.close() without return types