code: def _get_untar_directory(tar_file: str) -> str:
      base_path = os.path.dirname(tar_file)
      file_name = os.path.splitext(os.path.basename(tar_file))[0]
      target_folder = os.path.join(base_path, file_name)
  
      return target_folder
  
imports: import os
  import logging
  from typing import Any, Optional
  from urllib.parse import urlparse
  import tarfile
  import uuid
  from iopath.common.file_io import PathHandler
  from iopath.common.file_io import HTTPURLHandler
  from iopath.common.file_io import get_cache_dir, file_lock
  from iopath.common.download import download
  from ..base_catalog import PathManager
label_desc: Use image node_id 1 for calling a global function with example usage: _get_untar_directory(tar_file) and returns: target_folder