class_docstr: The client side of :class:`TrialServer`.
class_docstr_tok: ["The","client","side","of",":","class",":","`","TrialServer","`","."]
code: def receive_parameter(self) -> ParameterRecord | None:
      response = requests.get(
          self._url + "/parameter/" + self._trial_id
      )
      if response.status_code != 200:
          _logger.error("Failed to receive parameter: %s", response)
          return None
      parameter = response.json()["parameter"]
      if not parameter:
          _logger.warning("Received empty parameter: '%s'", parameter)
          return None
      if not isinstance(parameter, str):
          _logger.error("Received invalid parameter: '%s'", parameter)
          return None
      return nni.load(parameter)
  
file_path: nni/nni/contrib/training_service/trial_client.py
imports: from __future__ import annotations
  import logging
  from typing_extensions import Literal
  import requests
  import nni
  from nni.typehint import ParameterRecord, TrialMetric
  from nni.runtime.env_vars import trial_env_vars
  from nni.runtime.trial_command_channel import TrialCommandChannel
  from .trial_runner import TrialServerHandler
  from .typehint import MetricCommand
label_desc: Use image node_id 2 for calling the TrialClient obj's underlying member method code with example usage: obj.receive_parameter() and returns: nni, None, None, None