class_docstr: The median stopping rule stops a pending trial X at step S
  if the trial’s best objective value by step S is strictly worse than the median value
  of the running averages of all completed trials’ objectives reported up to step S
  
  Paper: `Google Vizer: A Service for Black-Box Optimization
  <https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf>`__
  
  Examples
  --------
  
  .. code-block::
  
      config.assessor.name = 'Medianstop'
      config.assessor.class_args = {
          'optimize_mode': 'maximize',
          'start_step': 5
      }
  
  Parameters
  ----------
  optimize_mode
      Whether optimize to minimize or maximize trial result.
  start_step
      A trial is determined to be stopped or not
      only after receiving start_step number of reported intermediate results.
code: def __init__(
      self,
      optimize_mode: Literal["minimize", "maximize"] = "maximize",
      start_step: int = 0,
  ):
      self._start_step = start_step
      self._running_history = dict()
      self._completed_avg_history = dict()
      if optimize_mode == "maximize":
          self._high_better = True
      elif optimize_mode == "minimize":
          self._high_better = False
      else:
          self._high_better = True
          logger.warning("unrecognized optimize_mode %s", optimize_mode)
  
file_path: nni/nni/algorithms/hpo/medianstop_assessor.py
imports: from __future__ import annotations
  import logging
  from schema import Schema, Optional
  from typing_extensions import Literal
  from nni import ClassArgsValidator
  from nni.assessor import Assessor, AssessResult
  from nni.utils import extract_scalar_history
label_desc: Use image node_id 1 to create a new MedianstopAssessor object from inherited base classes: Assessor with example: obj = MedianstopAssessor(optimize_mode, start_step)