code: def fetch_url(data: str, headers: dict[str, str]) -> dict[str, str]:
      """
      Celery job to fetch url
      """
      result = {}
      try:
          baseurl = app.config["WEBDRIVER_BASEURL"]
          url = f"{baseurl}api/v1/chart/warm_up_cache"
          logger.info("Fetching %s with payload %s", url, data)
          req = request.Request(
              url,
              data=bytes(data, "utf-8"),
              headers=headers,
              method="PUT",
          )
          response = (
              request.urlopen(  # pylint: disable=consider-using-with
                  req, timeout=600
              )
          )
          logger.info(
              "Fetched %s with payload %s, status code: %s",
              url,
              data,
              response.code,
          )
          if response.code == 200:
              result = {
                  "success": data,
                  "response": response.read().decode("utf-8"),
              }
          else:
              result = {"error": data, "status_code": response.code}
              logger.error(
                  "Error fetching %s with payload %s, status code: %s",
                  url,
                  data,
                  response.code,
              )
      except URLError as err:
          logger.exception("Error warming up cache!")
          result = {"error": data, "exception": str(err)}
      return result
  
imports: import json
  import logging
  from typing import Any, Optional, Union
  from urllib import request
  from urllib.error import URLError
  from celery.beat import SchedulingError
  from celery.utils.log import get_task_logger
  from sqlalchemy import and_, func
  from superset import app, db, security_manager
  from superset.extensions import celery_app
  from superset.models.core import Log
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.tags.models import Tag, TaggedObject
  from superset.utils.date_parser import parse_human_datetime
  from superset.utils.machine_auth import MachineAuthProvider
label_desc: Use image node_id 2 for calling a global function with example usage: fetch_url(data, headers) and returns: result