code: def get_image_config(
      image: str,
      *,
      platform: DockerPlatform = DockerPlatform.x86,
      token: Optional[str] = None,
  ) -> dict:
      image = parse_image_name(image)
      client = DockerRegistryClient()
      client.auth(image.repo, registry=image.registry, token=token)
  
      manifest = client.manifests(image.digest or image.tag)
      if (
          "config" not in manifest
      ):  # manifest index/list, pick the right platform
          for m in manifest["manifests"]:
              if m["platform"]["architecture"] == platform.value:
                  manifest = client.manifests(
                      m["digest"], accept=m["mediaType"]
                  )
                  break
          else:
              raise RuntimeError(
                  "No manifest for the specified platform"
              )
  
      return client.blobs(manifest["config"]["digest"])
  
file_path: dstack/src/dstack/_internal/server/services/docker.py
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Optional
  import requests
label_desc: Use image node_id 1 for calling a global function with example usage: get_image_config(image) and returns: client