code: def to_studio_params(dvc_params):
      """Convert from internal DVC format to Studio format.
  
      From:
  
      {
          "workspace": {
              "data": {
                  "params.yaml": {
                      "data": {"foo": 1}
                  }
              }
          }
      }
  
      To:
  
      {
          "params.yaml": {"foo": 1}
      }
      """
      result: Dict = {}
      if not dvc_params:
          return result
      for rev_data in dvc_params.values():
          for file_name, file_data in rev_data.get("data", {}).items():
              result[file_name] = file_data.get("data", {})
  
      return result
  
imports: import os
  import random
  import sys
  from collections import defaultdict
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Dict, Generator, Iterable, List, Mapping, Optional, Set, Tuple, Union
  from dvc.exceptions import InvalidArgumentError
  from dvc.repo.experiments.exceptions import AmbiguousExpRefInfo
  from dvc.rwlock import rwlock
  from dvc.scm import Git
  from .refs import EXEC_APPLY, EXEC_BASELINE, EXEC_BRANCH, EXPS_NAMESPACE, ITER_SKIP_NAMESPACES, STASHES, ExpRefInfo
label_desc: Use image node_id 20 for calling a global function with example usage: to_studio_params(dvc_params) and returns: result, result