code: def list_archive(
      archive_path, archive_type: Optional[ArchiveType] = None
  ) -> List[str]:
      """Return list of files extracted in an archive (without extracting them)."""
      if archive_type is None:
          archive_type = infer_archive_type(archive_path)
      if archive_type == ArchiveType.UNKNOWN:
          logger.error(
              f"Could not infer type of archive {archive_path}.  May be an unsupported archive type."
              "Specify archive_type in the dataset config if this file has an unknown file extension."
          )
          return []
      if archive_type == ArchiveType.ZIP:
          with ZipFile(archive_path) as zfile:
              return zfile.namelist()
      elif archive_type == ArchiveType.GZIP:
          return [
              ".".join(archive_path.split(".")[:-1])
          ]  # Path minus the .gz extension
      elif archive_type in {
          ArchiveType.TAR,
          ArchiveType.TAR_ZIP,
          ArchiveType.TAR_BZ2,
          ArchiveType.TAR_GZ,
      }:
          with tarfile.open(archive_path) as tar_file:
              return tar_file.getnames()
      else:
          logger.error(f"Unsupported archive: {archive_path}")
      return []
  
file_path: ludwig/ludwig/datasets/archives.py
imports: import gzip
  import logging
  import os
  import shutil
  import tarfile
  from enum import Enum
  from typing import List, Optional
  from zipfile import ZipFile
  from ludwig.utils.fs_utils import upload_output_directory
label_desc: Use image node_id 3 for calling a global function with example usage: list_archive(archive_path, archive_type) and returns: list, list, zfile, list, tar_file