code: def notify_refs(
      repo_url: str,
      token: str,
      *,
      base_url: Optional[str] = STUDIO_URL,
      **refs: List[str],
  ) -> Dict[str, Any]:
      extra_keys = refs.keys() - {"pushed", "removed"}
      assert not extra_keys, f"got extra args: {extra_keys}"
  
      refs = compact(refs)
      if not refs:
          return {}
  
      logger.debug(
          "notifying Studio%s about updated experiments",
          f" ({base_url})" if base_url else "",
      )
      data = {"repo_url": repo_url, "client": "dvc", "refs": refs}
  
      try:
          r = post("webhook/dvc", token, data, base_url=base_url)
      except requests.RequestException as e:
          logger.trace("", exc_info=True)
  
          msg = str(e)
          if e.response is None:
              logger.warning("failed to notify Studio: %s", msg.lower())
              return {}
  
          r = e.response
          d = ignore(Exception, default={})(r.json)()
          status = r.status_code
          if detail := d.get("detail"):
              msg = f"{detail} ({status=})"
          logger.warning("failed to notify Studio: %s", msg.lower())
      else:
          d = r.json()
  
      if d:
          logger.trace(
              "received response: %s (status=%r)", d, r.status_code
          )
      return d
  
file_path: dvc/dvc/utils/studio.py
imports: from typing import TYPE_CHECKING, Any, Dict, List, Optional
  from urllib.parse import urljoin
  import requests
  from funcy import compact, ignore
  from requests.adapters import HTTPAdapter
  from dvc.env import DVC_STUDIO_OFFLINE, DVC_STUDIO_REPO_URL, DVC_STUDIO_TOKEN, DVC_STUDIO_URL
  from dvc.log import logger
label_desc: Use image node_id 2 for calling a global function with example usage: notify_refs(repo_url, token) and returns: d, dict, dict