code: def test_bazel_sharding_with_filters(mock_build_dir):
      """Test e2e working of the script without sharding with filters.
  
      Assert that the rules are properly filtered.
      """
      output = bazel_sharding.main(
          ["..."], index=0, count=1, tag_filters="size"
      )
      output = set(output)
      assert output == set(size_rules + size_and_timeout_rules)
  
      output = bazel_sharding.main(
          ["..."], index=0, count=1, tag_filters="-timeout"
      )
      output = set(output)
      assert output == set(size_rules + manual_rules)
  
      output = bazel_sharding.main(
          ["..."], index=0, count=1, tag_filters="size,timeout"
      )
      output = set(output)
      assert output == set(
          size_rules + timeout_rules + size_and_timeout_rules
      )
  
      output = bazel_sharding.main(
          ["..."], index=0, count=1, tag_filters="size,-timeout"
      )
      output = set(output)
      assert output == set(size_rules)
  
      output = bazel_sharding.main(
          ["..."], index=0, count=1, tag_filters="-size,-timeout"
      )
      output = set(output)
      assert output == set(manual_rules)
  
file_path: ray/ci/ray_ci/test_bazel_sharding.py
imports: from typing import List
  import pytest
  import os
  import shutil
  import sys
  import tempfile
  import bazel_sharding
label_desc: Use image node_id 6 for calling a global function with example usage: test_bazel_sharding_with_filters(mock_build_dir) without return types