code: def _decrease_refcnt() -> None:
      global _event_loop, _event_loop_refcnt
      with _event_loop_lock:
          _event_loop_refcnt -= 1
          if _event_loop_refcnt == 0:
              _event_loop.call_soon_threadsafe(_event_loop.stop)
              _event_loop = None
  
file_path: nni/nni/runtime/command_channel/websocket/connection.py
imports: from __future__ import annotations
  import asyncio
  import logging
  from threading import Lock, Thread
  from typing import Any, Type
  import websockets
  import nni
  from ..base import Command
label_desc: Use image node_id 3 for calling a global function with example usage: _decrease_refcnt() without return types