code: def docker_api(
      url: str, use_pagination: bool = False
  ) -> Dict[str, Any]:
      """
      Run a paginated fetch from the public Docker Hub API
      """
      if TEST_DATA is not None:
          if url not in TEST_DATA:
              raise urllib.error.HTTPError(
                  url, 404, "Not found", {}, None
              )
          return TEST_DATA[url]
      pagination = ""
      if use_pagination:
          pagination = f"?page_size={PAGE_SIZE}&page=1"
      url = DOCKER_API_BASE + url + pagination
      r, headers = get(url)
      reset = headers.get("x-ratelimit-reset")
      if reset is not None:
          reset = datetime.datetime.fromtimestamp(int(reset))
          reset = reset.isoformat()
      logging.info(
          f"Docker API Rate Limit: {headers.get('x-ratelimit-remaining')} / {headers.get('x-ratelimit-limit')} (reset at {reset})"
      )
      return r
  
file_path: tvm/ci/scripts/jenkins/determine_docker_images.py
imports: import argparse
  import datetime
  import json
  import logging
  import urllib.error
  import configparser
  from pathlib import Path
  from typing import Dict, Any
  from http_utils import get
  from cmd_utils import init_log, REPO_ROOT
label_desc: Use image node_id 1 for calling a global function with example usage: docker_api(url, use_pagination) and returns: r, TEST_DATA