code: def notify_refs_to_studio(
      repo: "Repo", git_remote: str, **refs: List[str]
  ) -> Optional[str]:
      import os
  
      config = repo.config["studio"]
      refs = compact(refs)
      if not refs or env2bool("DVC_TEST"):
          return None
  
      token = (
          os.environ.get(DVC_STUDIO_TOKEN)
          or os.environ.get("STUDIO_TOKEN")
          or config.get("token")
      )
      if not token:
          logger.debug("Studio token not found.")
          return None
  
      from dulwich.porcelain import get_remote_repo
  
      from dvc.utils import studio
  
      _, repo_url = get_remote_repo(repo.scm.dulwich.repo, git_remote)
      studio_url = os.environ.get(DVC_STUDIO_URL) or config.get("url")
      d = studio.notify_refs(
          repo_url, token, base_url=studio_url, **refs
      )
      return d.get("url")
  
imports: from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Mapping, Optional, Set, Union
  from funcy import compact, group_by
  from scmrepo.git.backend.base import SyncStatus
  from dvc.env import DVC_STUDIO_TOKEN, DVC_STUDIO_URL
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.repo import locked
  from dvc.repo.scm_context import scm_context
  from dvc.scm import Git, TqdmGit, iter_revs
  from dvc.utils import env2bool
  from dvc.utils.collections import ensure_list
  from .exceptions import UnresolvedExpNamesError
  from .refs import ExpRefInfo
  from .utils import exp_commits, exp_refs, exp_refs_by_baseline, resolve_name
label_desc: Use image node_id 1 for calling a global function with example usage: notify_refs_to_studio(repo, git_remote) and returns: d, None, None