code: def filepattern_for_dataset_split(
      *,
      dataset_name: str,
      split: str,
      data_dir: str,
      filetype_suffix: Optional[str] = None,
      num_shards: Optional[int] = None,
  ) -> str:
      """Returns the file pattern for the given dataset.
  
      TODO(tfds): remove this by start using ShardedFileTemplate
  
      Args:
        dataset_name: Name of the dataset
        split: Name of the requested split
        data_dir: The base folder that contains the dataset.
        filetype_suffix: Optional suffix, e.g. tfrecord
        num_shards: Optional argument. If specified, will return file@num_shards
          notation, otherwise file*.
      """
      template = ShardedFileTemplate(
          data_dir=epath.Path(data_dir),
          dataset_name=dataset_name,
          split=split,
          filetype_suffix=filetype_suffix,
      )
      return os.fspath(
          template.sharded_filepaths_pattern(num_shards=num_shards)
      )
  
imports: from __future__ import annotations
  import dataclasses
  import functools
  import os
  import re
  import textwrap
  from typing import Any, Dict, List, Mapping, MutableMapping, Optional, Tuple, Union
  from absl import logging
  from etils import epath
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import version
label_desc: Use image node_id 16 for calling a global function with example usage: filepattern_for_dataset_split() and returns: os