code: def test_bazel_sharding_end_to_end(mock_build_dir):
      """Test e2e working of the script without sharding.
  
      Assert that if we are doing no sharding, all the rules
      are outputted and the two strategies have the same
      outputs.
      """
      output = bazel_sharding.main(["..."], index=0, count=1)
      output = set(output)
      assert output == set(all_rules)
  
      output_naive = bazel_sharding.main(
          ["..."], index=0, count=1, sharding_strategy="naive"
      )
      output_naive = set(output_naive)
      assert output == output_naive
  
      output = bazel_sharding.main(
          ["..."], index=0, count=1, exclude_manual=True
      )
      output = set(output)
      assert output == set(all_rules).difference(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 5 for calling a global function with example usage: test_bazel_sharding_end_to_end(mock_build_dir) without return types