code: def parse_sharded_file_spec(spec: str) -> Tuple[str, int, str]:
      """Parse a sharded file specification.
  
      Args:
        spec: The sharded file specification. A sharded file spec is one like
          'gs://some/file@200.txt'. Here, '@200' specifies the number of shards.
  
      Returns:
        basename: The basename for the files.
        num_shards: The number of shards.
        suffix: The suffix if there is one, or '' if not.
      Raises:
        ShardError: If the spec is not a valid sharded specification.
      """
      m = SHARD_SPEC_PATTERN.match(spec)
      if not m:
          raise ShardError(
              (
                  "The file specification {0} is not a sharded file "
                  "specification because it did not match the regex "
                  "{1}"
              ).format(spec, SHARD_SPEC_PATTERN.pattern)
          )
  
      # If there's a non-empty suffix, we need to prepend '.' so we get files like
      # foo@20.ext instead of foo@ext
      suffix = "." + m.group(4) if m.group(4) else ""
  
      return m.group(2), int(m.group(3)), 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 1 for calling a global function with example usage: parse_sharded_file_spec(spec) and returns: m,  int,  suffix