code: def is_tarred_dataset(
      audio_file: str, manifest_file: Optional[str] = None
  ) -> bool:
      if "/" in audio_file or manifest_file is None:
          # audio files in a tarred dataset don't have `/` in their paths
          return False
      if (
          os.path.basename(manifest_file)
          == "tarred_audio_manifest.json"
      ):
          # the manifest file is a tarred manifest
          return True
      if "/sharded_manifests/" in manifest_file and re.match(
          r"^manifest_(\d+)\.json$", os.path.basename(manifest_file)
      ):
          # the manifest file is a sharded manifest
          return True
      return False
  
file_path: NeMo/nemo/collections/common/parts/preprocessing/manifest.py
imports: import json
  import os
  import re
  from os.path import expanduser
  from typing import Any, Callable, Dict, Iterator, List, Optional, Union
  from nemo.utils import logging
  from nemo.utils.data_utils import DataStoreObject, datastore_path_to_local_path, is_datastore_path
  from nemo.utils.nemo_logging import LogMode
label_desc: Use image node_id 3 for calling a global function with example usage: is_tarred_dataset(audio_file, manifest_file) and returns: False, False, True, True