code: def version_check():
      try:
          current_pkg_version = get_package_version()
          latest_pkg_version = httpx.get(
              url=PKG_VERSION_URL, timeout=3
          ).json()["version"]
          if Version(latest_pkg_version) > Version(current_pkg_version):
              print(
                  f"IMPORTANT: You are using gradio version {current_pkg_version}, "
                  f"however version {latest_pkg_version} is available, please upgrade."
              )
              print("--------")
      except json.decoder.JSONDecodeError:
          warnings.warn(
              "unable to parse version details from package URL."
          )
      except KeyError:
          warnings.warn("package URL does not contain version info.")
      except Exception:
          pass
  
imports: from __future__ import annotations
  import asyncio
  import json
  import os
  import threading
  import urllib.parse
  import warnings
  from typing import Any
  import httpx
  from packaging.version import Version
  import gradio
  from gradio import wasm_utils
  from gradio.context import Context
  from gradio.utils import get_package_version
label_desc: Use image node_id 4 for calling a global function with example usage: version_check() without return types