class_docstr: State machine that computes the next state of a test based on the current state and
  perform actions accordingly during the state transition. For example:
  - passing -[two last results failed]-> failing: create github issue
  - failing -[last result passed]-> passing: close github issue
  - jailed -[latest result passed]-> passing: update the test's oncall
  ...
code: def __init__(
      self, test: Test, history_length: int = 10, dry_run: bool = False
  ) -> None:
      self.test = test
      self.test_results = test.get_test_results(limit=history_length)
      self.dry_run = dry_run
      TestStateMachine._init_ray_repo()
      TestStateMachine._init_ray_buildkite()
  
imports: import abc
  from github import Github
  from pybuildkite.buildkite import Buildkite
  from ray_release.test import Test, TestState
  from ray_release.aws import get_secret_token
label_desc: Use image node_id 1 to create a new TestStateMachine object from inherited base classes: abc with example: obj = TestStateMachine(test, history_length, dry_run)