docstr: Tests that the repr string is correctly formatted for all
  TransitionCriterion child classes.
docstr_tok: ["Tests","that","the","repr","string","is","correctly","formatted","for","all","TransitionCriterion","child","classes","."]
code: def test_repr(self) -> None:
      """Tests that the repr string is correctly formatted for all
      TransitionCriterion child classes.
      """
      self.maxDiff = None
      max_trials_criterion = MaxTrials(
          threshold=5,
          block_gen_if_met=True,
          block_transition_if_unmet=False,
          transition_to="GenerationStep_1",
          only_in_statuses=[TrialStatus.COMPLETED],
          not_in_statuses=[TrialStatus.FAILED],
      )
      self.assertEqual(
          str(max_trials_criterion),
          "MaxTrials({'threshold': 5, "
          + "'only_in_statuses': [<TrialStatus.COMPLETED: 3>], "
          + "'not_in_statuses': [<TrialStatus.FAILED: 2>], "
          + "'transition_to': 'GenerationStep_1', "
          + "'block_transition_if_unmet': False, "
          + "'block_gen_if_met': True})",
      )
      minimum_trials_in_status_criterion = MinTrials(
          only_in_statuses=[
              TrialStatus.COMPLETED,
              TrialStatus.EARLY_STOPPED,
          ],
          threshold=0,
          transition_to="GenerationStep_2",
          block_gen_if_met=True,
          block_transition_if_unmet=False,
          not_in_statuses=[TrialStatus.FAILED],
      )
      self.assertEqual(
          str(minimum_trials_in_status_criterion),
          "MinTrials({'threshold': 0, 'only_in_statuses': "
          + "[<TrialStatus.COMPLETED: 3>, <TrialStatus.EARLY_STOPPED: 7>], "
          + "'not_in_statuses': [<TrialStatus.FAILED: 2>], "
          + "'transition_to': 'GenerationStep_2', "
          + "'block_transition_if_unmet': False, "
          + "'block_gen_if_met': True})",
      )
      minimum_preference_occurances_criterion = (
          MinimumPreferenceOccurances(metric_name="m1", threshold=3)
      )
      self.assertEqual(
          str(minimum_preference_occurances_criterion),
          "MinimumPreferenceOccurances({'metric_name': 'm1', 'threshold': 3, "
          + "'transition_to': None, 'block_gen_if_met': False})",
      )
      deprecated_min_trials_criterion = MinimumTrialsInStatus(
          status=TrialStatus.COMPLETED, threshold=3
      )
      self.assertEqual(
          str(deprecated_min_trials_criterion),
          "MinimumTrialsInStatus({"
          + "'status': <TrialStatus.COMPLETED: 3>, "
          + "'threshold': 3, "
          + "'transition_to': None})",
      )
      max_parallelism = MaxGenerationParallelism(
          only_in_statuses=[TrialStatus.EARLY_STOPPED],
          threshold=3,
          transition_to="GenerationStep_2",
          block_gen_if_met=True,
          block_transition_if_unmet=False,
          not_in_statuses=[TrialStatus.FAILED],
      )
      self.assertEqual(
          str(max_parallelism),
          "MaxGenerationParallelism({'threshold': 3, 'only_in_statuses': "
          + "[<TrialStatus.EARLY_STOPPED: 7>], "
          + "'not_in_statuses': [<TrialStatus.FAILED: 2>], "
          + "'transition_to': 'GenerationStep_2', "
          + "'block_transition_if_unmet': False, "
          + "'block_gen_if_met': True})",
      )
  
file_path: Ax/ax/modelbridge/tests/test_transition_criterion.py
imports: import logging
  from logging import Logger
  from unittest.mock import patch
  import pandas
  from ax.core.base_trial import TrialStatus
  from ax.core.data import Data
  from ax.modelbridge.generation_strategy import GenerationStep, GenerationStrategy
  from ax.modelbridge.registry import Models
  from ax.modelbridge.transition_criterion import MaxGenerationParallelism, MaxTrials, MinimumPreferenceOccurances, MinimumTrialsInStatus, MinTrials, TransitionCriterion
  from ax.utils.common.logger import get_logger
  from ax.utils.common.testutils import TestCase
  from ax.utils.testing.core_stubs import get_branin_experiment, get_experiment
label_desc: Use image node_id 6 for calling the TestTransitionCriterion obj's underlying member method code with example usage: obj.test_repr() without return types