class_docstr: Mock a trial command channel for evaluator debugging.
class_docstr_tok: ["Mock","a","trial","command","channel","for","evaluator","debugging","."]
code: def send_metric(
      self,
      type: Literal["PERIODICAL", "FINAL"],
      parameter_id: int | None,  # pylint: disable=redefined-builtin
      trial_job_id: str,
      sequence: int,
      value: TrialMetric,
  ) -> None:
      if type == "FINAL":
          self.model.metrics.final = value
          _logger.info("[Mock] Final metric: %s", value)
      else:
          self.model.metrics.add_intermediate(value)
          _logger.info("[Mock] Intermediate metric: %s", value)
  
imports: from __future__ import annotations
  import logging
  from contextlib import contextmanager
  from typing import Any, Callable, Iterator, Iterable, Generator, TYPE_CHECKING, cast
  from typing_extensions import Literal
  import nni
  from nni.common.serializer import is_traceable, SerializableObject
  from nni.mutable import Mutable, Sample, LabeledMutable, SampleValidationError
  from nni.mutable.mutable import _mutable_equal
  from nni.runtime.trial_command_channel import TrialCommandChannel, set_default_trial_command_channel, get_default_trial_command_channel
  from nni.typehint import ParameterRecord, TrialMetric, Parameters
label_desc: Use image node_id 3 for calling the _EvaluatorMockTrialCommandChannel obj's underlying member method code with example usage: obj.send_metric(type, parameter_id, trial_job_id, sequence, value) without return types