code: def extract_tar(tar_file: Path, to_path: Path):
      """
      Extract a ``.tar.gz`` file.
  
      Arguments:
          tar_file (Path): ``.tar.gz`` file
          to_path (Path): location to extract the contents
      """
      with tarfile.open(str(tar_file), "r:gz") as tar:
          files = tar.getmembers()
  
          for f in monit.iterate("Extract tar", files):
              if f.isdir():
                  pass
              elif f.isfile():
                  _extract_tar_file(tar, f, to_path / f.name)
              else:
                  logger.log(
                      f"Unknown file type {f.name}", Text.warning
                  )
  
imports: import tarfile
  from pathlib import Path
  from labml import monit, logger
  from labml.logger import Text
label_desc: Use image node_id 3 for calling a global function with example usage: extract_tar(tar_file, to_path) without return types