code: def test_receive():
      # Send commands to server via stdin, and get them back via channel.
      _server.stdin.write(json.dumps(_command1) + "\n")
      _server.stdin.write(json.dumps(_command2) + "\n")
      _server.stdin.flush()
  
      received1 = _client.receive()
      assert received1 == _command1, received1
  
      received2 = _client.receive()
      assert received2 == _command2, received2
  
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 3 for calling a global function with example usage: test_receive() without return types