code: def _untar_model_weights(model_tar):
      """untar model files"""
  
      model_dir = _get_untar_directory(model_tar)
  
      if not os.path.exists(
          os.path.join(model_dir, _TAR_FILE_NAME_LIST[0])
      ) or not os.path.exists(
          os.path.join(model_dir, _TAR_FILE_NAME_LIST[2])
      ):
          # the path to save the decompressed file
          os.makedirs(model_dir, exist_ok=True)
          with tarfile.open(model_tar, "r") as tarobj:
              for member in tarobj.getmembers():
                  filename = None
                  for tar_file_name in _TAR_FILE_NAME_LIST:
                      if tar_file_name in member.name:
                          filename = tar_file_name
                  if filename is None:
                      continue
                  file = tarobj.extractfile(member)
                  with open(
                      os.path.join(model_dir, filename), "wb"
                  ) as model_file:
                      model_file.write(file.read())
      return model_dir
  
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 2 for calling a global function with example usage: _untar_model_weights(model_tar) and returns: model_dir