code: def env_to_config(env: Dict[str, Any]) -> Dict[str, Any]:
      config = {}
      if DVC_STUDIO_OFFLINE in env:
          config["offline"] = env[DVC_STUDIO_OFFLINE]
      if DVC_STUDIO_REPO_URL in env:
          config["repo_url"] = env[DVC_STUDIO_REPO_URL]
      if DVC_STUDIO_TOKEN in env:
          config["token"] = env[DVC_STUDIO_TOKEN]
      if DVC_STUDIO_URL in env:
          config["url"] = env[DVC_STUDIO_URL]
      return config
  
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 4 for calling a global function with example usage: env_to_config(env) and returns: config