code: def test_sanity_check():
      def _mock_run_test(*args, **kwawrgs) -> Dict[str, Dict[int, str]]:
          return {
              "passing_revision": {0: "passed", 1: "passed"},
              "failing_revision": {0: "failed", 1: "failed"},
              "flaky_revision": {0: "failed", 1: "passed"},
          }
  
      with mock.patch(
          "ray_release.scripts.ray_bisect._run_test",
          side_effect=_mock_run_test,
      ):
          assert _sanity_check(
              {}, "passing_revision", "failing_revision", 2
          )
          assert _sanity_check(
              {}, "passing_revision", "flaky_revision", 2
          )
          assert not _sanity_check(
              {}, "failing_revision", "passing_revision", 2
          )
          assert not _sanity_check(
              {}, "passing_revision", "passing_revision", 2
          )
          assert not _sanity_check(
              {}, "failing_revision", "failing_revision", 2
          )
          assert not _sanity_check(
              {}, "flaky_revision", "failing_revision", 2
          )
  
file_path: ray/release/ray_release/tests/test_bisect.py
imports: import sys
  import pytest
  from unittest import mock
  from typing import List, Dict
  from ray_release.scripts.ray_bisect import _bisect, _obtain_test_result, _sanity_check, _get_test
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity_check() and returns: dict