code: def _merge_params(s_list) -> Dict[str, List[str]]:
      d = defaultdict(list)
      default_file = ParamsDependency.DEFAULT_PARAMS_FILE
  
      # figure out completely tracked params file, and ignore specific keys
      wholly_tracked: Set[str] = set()
      for key in s_list:
          if not isinstance(key, dict):
              continue
          wholly_tracked.update(
              k for k, params in key.items() if not params
          )
  
      for key in s_list:
          if isinstance(key, str):
              if default_file not in wholly_tracked:
                  d[default_file].append(key)
              continue
  
          if not isinstance(key, dict):
              msg = "Only list of str/dict is supported. Got: "
              msg += f"'{type(key).__name__}'."
              raise ValueError(msg)  # noqa: TRY004
  
          for k, params in key.items():
              if k in wholly_tracked:
                  d[k] = []
                  continue
              if not isinstance(params, list):
                  msg = (
                      "Expected list of params for custom params file "
                  )
                  msg += f"'{k}', got '{type(params).__name__}'."
                  raise ValueError(msg)  # noqa: TRY004
              d[k].extend(params)
      return d
  
file_path: dvc/dvc/dependency/__init__.py
imports: from collections import defaultdict
  from typing import Any, Dict, List, Mapping, Set
  from dvc.output import ARTIFACT_SCHEMA, DIR_FILES_SCHEMA, Output
  from .base import Dependency
  from .db import DbDependency
  from .param import ParamsDependency
  from .repo import RepoDependency
label_desc: Use image node_id 4 for calling a global function with example usage: _merge_params(s_list) and returns: d