code: def generate_sharded_filenames(spec: str) -> Iterator[str]:
      """Generator for the list of filenames corresponding to the sharding path.
  
      Args:
        spec: Represents a filename with a sharding specification.
          e.g., 'gs://some/file@200.txt' represents a file sharded 200 ways.
  
      Yields:
        Each filename in the sharding path.
  
      Raises:
        ShardError: If spec is not a valid sharded file specification.
      """
      basename, num_shards, suffix = parse_sharded_file_spec(spec)
      width = _shard_width(num_shards)
      format_str = "{{0}}-{{1:0{0}}}-of-{{2:0{0}}}{{3}}".format(width)
      for i in range(num_shards):
          yield format_str.format(basename, i, num_shards, suffix)
  
file_path: scenic/scenic/projects/vivit/data/file_utils.py
imports: import math
  import re
  from typing import Iterator, Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: generate_sharded_filenames(spec) without return types