code: def test_url_download_bundle(
      self, bundle_files, bundle_name, url, hash_val
  ):
      with skip_if_downloading_fails():
          # download a single file from url, also use `args_file`
          with tempfile.TemporaryDirectory() as tempdir:
              def_args = {
                  "name": bundle_name,
                  "bundle_dir": tempdir,
                  "url": "",
              }
              def_args_file = os.path.join(tempdir, "def_args.json")
              parser = ConfigParser()
              parser.export_config_file(
                  config=def_args, filepath=def_args_file
              )
              cmd = [
                  "coverage",
                  "run",
                  "-m",
                  "monai.bundle",
                  "download",
                  "--args_file",
                  def_args_file,
              ]
              cmd += ["--url", url, "--source", "github"]
              command_line_tests(cmd)
              for file in bundle_files:
                  file_path = os.path.join(tempdir, bundle_name, file)
                  self.assertTrue(os.path.exists(file_path))
              if file == "network.json":
                  self.assertTrue(
                      check_hash(filepath=file_path, val=hash_val)
                  )
  
imports: from __future__ import annotations
  import json
  import os
  import tempfile
  import unittest
  from unittest.case import skipUnless
  import numpy
  import torch
  from parameterized import parameterized
  import monai.networks.nets
  from monai.apps import check_hash
  from monai.bundle import ConfigParser, create_workflow, load
  from monai.utils import optional_import
  from tests.utils import SkipIfBeforePyTorchVersion, assert_allclose, command_line_tests, skip_if_downloading_fails, skip_if_no_cuda, skip_if_quick
label_desc: Use image node_id 2 for calling the TestDownload obj's underlying member method code with example usage: obj.test_url_download_bundle(bundle_files, bundle_name, url, hash_val) without return types