code: def infer_archive_type(archive_path):
      """Try to infer archive type from file extension."""
      # Get the path extension including multiple extensions, ex. ".tar.gz"
      extension = ".".join(
          ["", *os.path.basename(archive_path).split(".")[1:]]
      )
      extension = extension.lower()
      if extension.endswith(".tar.z") or extension.endswith(".tar.zip"):
          return ArchiveType.TAR_ZIP
      elif extension.endswith(".tar.bz2") or extension.endswith(
          ".tbz2"
      ):
          return ArchiveType.TAR_BZ2
      elif extension.endswith(".tar.gz") or extension.endswith(".tgz"):
          return ArchiveType.TAR_GZ
      elif extension.endswith(".tar"):
          return ArchiveType.TAR
      elif extension.endswith(".zip") or extension.endswith(".zipx"):
          return ArchiveType.ZIP
      elif extension.endswith(".gz") or extension.endswith(".gzip"):
          return ArchiveType.GZIP
      else:
          return ArchiveType.UNKNOWN
  
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 1 for calling a global function with example usage: infer_archive_type(archive_path) and returns: ArchiveType, ArchiveType, ArchiveType, ArchiveType, ArchiveType, ArchiveType, ArchiveType