code: def test_bazel_sharding_optimal_too_many_shards(
      mock_build_dir, sharding_strategy
  ):
      """
      Test e2e working of the script with sharding in the case of more shards than tests.
  
      Assert that the first shard has one test and the final one has none.
      """
      output_1 = bazel_sharding.main(
          ["..."],
          index=0,
          count=len(all_rules) + 1,
          sharding_strategy=sharding_strategy,
      )
      output_1 = set(output_1)
  
      output_2 = bazel_sharding.main(
          ["..."],
          index=len(all_rules),
          count=len(all_rules) + 1,
          sharding_strategy=sharding_strategy,
      )
      output_2 = set(output_2)
  
      assert len(output_1) == 1
      assert not output_2
  
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 8 for calling a global function with example usage: test_bazel_sharding_optimal_too_many_shards(mock_build_dir, sharding_strategy) without return types