code: def test_get_all_test_query() -> None:
      assert _get_all_test_query(["a", "b"], "core") == (
          "attr(tags, '\\\\bteam:core\\\\b', tests(a) union tests(b))"
      )
      assert _get_all_test_query(["a"], "core", except_tags="tag") == (
          "attr(tags, '\\\\bteam:core\\\\b', tests(a)) "
          "except (attr(tags, '\\\\btag\\\\b', tests(a)))"
      )
      assert _get_all_test_query(["a"], "core", only_tags="tag") == (
          "attr(tags, '\\\\bteam:core\\\\b', tests(a)) "
          "intersect (attr(tags, '\\\\btag\\\\b', tests(a)))"
      )
      assert _get_all_test_query(
          ["a"], "core", except_tags="tag1", only_tags="tag2"
      ) == (
          "attr(tags, '\\\\bteam:core\\\\b', tests(a)) "
          "intersect (attr(tags, '\\\\btag2\\\\b', tests(a))) "
          "except (attr(tags, '\\\\btag1\\\\b', tests(a)))"
      )
  
file_path: ray/ci/ray_ci/test_tester.py
imports: import os
  import re
  import sys
  from tempfile import TemporaryDirectory
  from unittest import mock
  import pytest
  from ci.ray_ci.linux_tester_container import LinuxTesterContainer
  from ci.ray_ci.windows_tester_container import WindowsTesterContainer
  from ci.ray_ci.tester import _add_default_except_tags, _get_container, _get_all_test_query, _get_test_targets, _get_flaky_test_targets, _get_tag_matcher
label_desc: Use image node_id 5 for calling a global function with example usage: test_get_all_test_query() without return types