code: def _move_state(test, production: bool) -> None:
      """
      Run state machine on all CI tests.
      """
      logger.info(
          f"Running state machine on test {test.get_name()} ..."
      )
      test.update_from_s3()
      logger.info(f"\tOld state: {test.get_state()}")
  
      CITestStateMachine(test, dry_run=not production).move()
      logger.info(f"\tNew state: {test.get_state()}")
  
      if not production:
          return
  
      test.persist_to_s3()
      logger.info("\tTest state updated successfully")
  
file_path: ray/ci/ray_ci/automation/state_machine_bot.py
imports: import click
  from typing import List
  from ci.ray_ci.utils import logger
  from ray_release.test import Test
  from ray_release.test_automation.ci_state_machine import CITestStateMachine
  from ray_release.configs.global_config import init_global_config
  from ray_release.bazel import bazel_runfile
label_desc: Use image node_id 2 for calling a global function with example usage: _move_state(test, production) without return types