code: def docker_api(url: str) -> Dict[str, Any]:
      """
      Run a paginated fetch from the public Docker Hub API
      """
      if TEST_DATA is not None:
          return TEST_DATA[url]
      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})"
      )
      if "results" not in r:
          raise RuntimeError(
              f"Error fetching data, no results found in: {r}"
          )
      return r
  
file_path: tvm/ci/scripts/jenkins/should_rebuild_docker.py
imports: import argparse
  import datetime
  import json
  import logging
  import subprocess
  from typing import Dict, Any, List
  from http_utils import get
  from cmd_utils import Sh, init_log
label_desc: Use image node_id 1 for calling a global function with example usage: docker_api(url) and returns: r, TEST_DATA