code: def get_full_path(
      audio_file: Union[str, List[str]],
      manifest_file: Optional[str] = None,
      data_dir: Optional[str] = None,
      audio_file_len_limit: int = 255,
  ) -> Union[str, List[str]]:
      """Get full path to audio_file.
  
      If the audio_file is a relative path and does not exist,
      try to attach the parent directory of manifest to the audio path.
      Revert to the original path if the new path still doesn't exist.
      Assume that the audio path is like "wavs/xxxxxx.wav".
  
      Args:
          audio_file: path to an audio file, either absolute or assumed relative
                      to the manifest directory or data directory.
                      Alternatively, a list of paths may be provided.
          manifest_file: path to a manifest file
          data_dir: path to a directory containing data, use only if a manifest file is not provided
          audio_file_len_limit: limit for length of audio_file when using relative paths
  
      Returns:
          Full path to audio_file or a list of paths.
      """
      if isinstance(audio_file, list):
          # If input is a list, return a list of full paths
          return [
              get_full_path(
                  audio_file=a_file,
                  manifest_file=manifest_file,
                  data_dir=data_dir,
                  audio_file_len_limit=audio_file_len_limit,
              )
              for a_file in audio_file
          ]
      elif isinstance(audio_file, str):
          # If input is a string, get the corresponding full path
          if is_tarred_dataset(
              audio_file=audio_file, manifest_file=manifest_file
          ):
              logging.warning(
                  f"Manifest file `{manifest_file}` seems to be part of a tarred dataset, skip checking for relative paths. If this is not intended, please avoid having `/sharded_manifests/` and `tarred_audio_manifest.json` in manifest_filepath.",
                  mode=LogMode.ONCE,
              )
              return audio_file
          if (
              (len(audio_file) < audio_file_len_limit)
              and not os.path.isabs(audio_file)
              and not os.path.isfile(audio_file)
          ):
              # If audio_file is not available and the path is not absolute, the full path is assumed
              # to be relative to the manifest file parent directory or data directory.
              if manifest_file is None and data_dir is None:
                  raise ValueError(
                      f"Use either manifest_file or data_dir to specify the data directory."
                  )
              elif manifest_file is not None and data_dir is not None:
                  raise ValueError(
                      f"Parameters manifest_file and data_dir cannot be used simultaneously. Currently manifest_file is {manifest_file} and data_dir is {data_dir}."
                  )
  
              # resolve the data directory
              if data_dir is None:
                  data_dir = os.path.dirname(manifest_file)
  
              # assume audio_file path is relative to data_dir
              audio_file_path = os.path.join(data_dir, audio_file)
  
              if is_datastore_path(audio_file_path):
                  # If audio was originally on an object store, use locally-cached path
                  audio_file_path = datastore_path_to_local_path(
                      audio_file_path
                  )
  
              if os.path.isfile(audio_file_path):
                  audio_file = os.path.abspath(audio_file_path)
              else:
                  audio_file = expanduser(audio_file)
          else:
              audio_file = expanduser(audio_file)
          return audio_file
      else:
          raise ValueError(
              f"Unexpected audio_file type {type(audio_file)}, audio_file {audio_file}."
          )
  
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 4 for calling a global function with example usage: get_full_path(audio_file, manifest_file, data_dir, audio_file_len_limit) and returns: unknown, audio_file, audio_file