code: def _close_sessions(cls, *args, **kwargs):
      threads = []
      for _, sessions in cls.sessions.items():
          for session in sessions:
              th = threading.Thread(target=session.close)
              th.daemon = True
              threads.append(th)
  
      for th in threads:
          th.start()
  
      for th in threads:
          th.join()
  
      if len(args):
          if args[0] == 15:
              signal.signal(
                  signal.SIGTERM, cls._original_sigterm_handler
              )
              os.kill(os.getpid(), 15)
  
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 8 for calling the Session obj's underlying member method code with example usage: obj._close_sessions(cls) without return types