code: def _receive_command(self) -> Command | None:
      for i in range(5):
          try:
              conn = self._ensure_conn()
              command = conn.receive()
              if not self._closing:
                  assert command is not None
              return command
          except Exception:
              _logger.exception(
                  f"Failed to receive command. Retry in {i}s"
              )
              self._terminate_conn("receive fail")
              time.sleep(i)
      _logger.warning(f"Failed to receive command. Last retry")
      conn = self._ensure_conn()
      conn.receive()
  
file_path: nni/nni/runtime/command_channel/websocket/channel.py
imports: from __future__ import annotations
  import logging
  import time
  from ..base import Command, CommandChannel
  from .connection import WsConnection
label_desc: Use image node_id 9 for calling the WsChannelClient obj's underlying member method code with example usage: obj._receive_command() and returns: command