code: def glob_list_sharded_file_patterns(
      comma_separated_patterns: str, sep: str = ","
  ) -> List[str]:
      """Generate list of filenames corresponding to `comma_separated_patterns`.
  
      Args:
        comma_separated_patterns: str. A pattern or a comma-separated list of
          patterns that represent file names.
        sep: char. Separator character.
  
      Returns:
        List of filenames, sorted and dedupped.
      """
      return sorted(
          set(
              [
                  os.fspath(f)
                  for pattern in comma_separated_patterns.split(sep)
                  # Note: epath.Path().glob(normalize_to_sharded_file_pattern(pattern))
                  # does not work with gs://.
                  for f in epath.Path(
                      os.path.dirname(
                          normalize_to_sharded_file_pattern(pattern)
                      )
                  ).glob(
                      os.path.basename(
                          normalize_to_sharded_file_pattern(pattern)
                      )
                  )
              ]
          )
      )
  
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 4 for calling a global function with example usage: glob_list_sharded_file_patterns(comma_separated_patterns, sep) and returns: sorted