code: def parse_sharded_filename(filename):
      """Parse a sharded name specification.
  
      Args:
        filename: str. The sharded filename. A sharded filename is one like
          'gs://some/file-00000-of-00200.txt'.
  
      Returns:
        basename: str. The first part before the -ddddd-of-ddddd part.
        shard_index: str: The first part of -ddddd-of-ddddd
        num_shards: str: The number of shards. (Second part after "of")
        suffix: str. Any string after the -ddddd-of-ddddd part.
      Raises:
        ShardError: If the spec is not a valid sharded specification.
      """
      m = SHARD_FILE_PATTERN.match(filename)
      if not m:
          raise ShardError(
              (
                  "The file specification {0} is not a sharded file "
                  "specification because it did not match the regex "
                  "{1}"
              ).format(filename, SHARD_FILE_PATTERN.pattern)
          )
      suffix = "" if m.group(4) is None else m.group(4)
      return m.group(1), m.group(2), m.group(3), suffix
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  import re
  from typing import List, Tuple
  from etils import epath
  import six
label_desc: Use image node_id 12 for calling a global function with example usage: parse_sharded_filename(filename) and returns: m,  m,  m,  suffix