code: def test_connect():
      global _client
      port = _init()
      _client = WsChannelClient(f"ws://localhost:{port}")
      _client.connect()
  
file_path: nni/test/ut/sdk/test_ws_channel.py
imports: import atexit
  from dataclasses import dataclass
  import importlib
  import json
  import os
  from pathlib import Path
  from subprocess import Popen, PIPE
  import sys
  import time
  from nni.runtime.command_channel.websocket import WsChannelClient
label_desc: Use image node_id 1 for calling a global function with example usage: test_connect() without return types