code: def download_corenlp_models(
      model,
      version,
      dir=DEFAULT_CORENLP_DIR,
      url=DEFAULT_CORENLP_MODEL_URL,
      logging_level="INFO",
      proxies=None,
      force=True,
  ):
      """
      A automatic way to download the CoreNLP models.
  
      Args:
          model: the name of the model, can be one of 'arabic', 'chinese', 'english',
              'english-kbp', 'french', 'german', 'hungarian', 'italian', 'spanish'
          version: the version of the model
          dir: the directory to download CoreNLP model into; alternatively can be
              set up with environment variable $CORENLP_HOME
          url: The link to download CoreNLP models.
               It will need {model} and either {version} or {tag} to properly format the URL
          logging_level: logging level to use during installation
          force: Download model anyway, no matter model file exists or not
      """
      dir = os.path.expanduser(dir)
      if not model or not version:
          raise ValueError(
              "Both model and model version should be specified."
          )
      logger.info(
          f"Downloading {model} models (version {version}) into directory {dir}"
      )
      model = model.strip().lower()
      if model not in AVAILABLE_MODELS:
          raise KeyError(
              f"{model} is currently not supported. "
              f"Must be one of: {list(AVAILABLE_MODELS)}."
          )
      # for example:
      # https://huggingface.co/stanfordnlp/CoreNLP/resolve/v4.2.2/stanford-corenlp-models-french.jar
      tag = version if version == "main" else "v" + version
      download_url = url.format(tag=tag, model=model, version=version)
      model_path = os.path.join(
          dir, f"stanford-corenlp-{version}-models-{model}.jar"
      )
  
      if os.path.exists(model_path) and not force:
          logger.warn(
              f"Model file {model_path} already exists. "
              f"Please download this model to a new directory."
          )
          return
  
      try:
          request_file(download_url, model_path, proxies)
      except (KeyboardInterrupt, SystemExit):
          raise
      except Exception as e:
          raise RuntimeError(
              "Downloading CoreNLP model file failed. "
              "Please try manual downloading at: https://stanfordnlp.github.io/CoreNLP/."
          ) from e
  
imports: import os
  import logging
  import zipfile
  import shutil
  from stanza.resources.common import HOME_DIR, request_file, unzip, get_root_from_zipfile, set_logging_level
label_desc: Use image node_id 1 for calling a global function with example usage: download_corenlp_models(model, version, dir, url, logging_level, proxies, force) without return types