code: def test_ensure_file_downloaded():
      ensure_file_downloaded(
          "https://ftp.gnu.org/gnu/tar/tar-1.34.tar.gz",
          "test-tar",
          unpack=True,
          unpack_type="untar",
      )
      assert os.path.isdir("test-tar")
      shutil.rmtree("test-tar")
  
      ensure_file_downloaded(
          "https://ftp.gnu.org/gnu/gzip/gzip-1.9.zip",
          "test-zip",
          unpack=True,
      )
      assert os.path.isdir("test-zip")
      shutil.rmtree("test-zip")
  
file_path: H2O/h2o_hf/helm/src/helm/common/test_general.py
imports: import shutil
  import os
  from helm.common.general import ensure_file_downloaded, format_tags, flatten_list, format_split, get_file_name, unique_simplification
label_desc: Use image node_id 1 for calling a global function with example usage: test_ensure_file_downloaded() without return types