code: def _download_public_evaluations(
      include_forecasts: bool, evaluations_path: Path
  ) -> None:
      public_bucket = "odp-tsbench"
      session = default_session()
      client = session.client(
          "s3",
          config=botocore.client.Config(  # type: ignore
              signature_version=botocore.UNSIGNED,
              max_pool_connections=2 * cast(int, os.cpu_count()),
          ),
      )
  
      # First, download the metrics
      print("Downloading metrics...")
      with tempfile.TemporaryDirectory() as tmp:
          file = Path(tmp) / "metrics.tar.gz"
          client.download_file(
              public_bucket, "metrics.tar.gz", str(file)
          )
          with tarfile.open(file, mode="r:gz") as tar:
              safe_extractall(tar, evaluations_path)
  
      # Then, optionally download the forecasts
      if include_forecasts:
          print("Downloading forecasts...")
  
          # First, get all files
          with tqdm(desc="List objects") as progress:
              response = client.list_objects(Bucket=public_bucket)
              objects = _extract_object_names(response)
              progress.update()
              while response["IsTruncated"]:
                  response = client.list_objects(
                      Bucket=public_bucket, Marker=objects[-1]
                  )
                  objects.extend(_extract_object_names(response))
                  progress.update()
  
          # Then, download all of the objects
          run_parallel(
              partial(
                  _download_object,
                  bucket=public_bucket,
                  client=client,
                  destination=evaluations_path,
              ),
              objects,
              2 * cast(int, os.cpu_count()),
          )
  
imports: import os
  import tarfile
  import tempfile
  from functools import partial
  from pathlib import Path
  from typing import Any, cast, Dict, List, Optional
  import botocore
  import click
  from gluonts.util import safe_extractall
  from tqdm.auto import tqdm
  from tqdm.contrib.concurrent import process_map
  from tsbench.analysis.utils import run_parallel
  from tsbench.constants import DEFAULT_EVALUATIONS_PATH
  from tsbench.evaluations import aws
  from tsbench.evaluations.aws import default_session
  from tsbench.evaluations.tracking.job import Job, load_jobs_from_analysis
  from ._main import evaluations
label_desc: Use image node_id 2 for calling a global function with example usage: _download_public_evaluations(include_forecasts, evaluations_path) without return types