code: def update_defaults(
      new: Mapping,
      config: dict = config,
      defaults: list[Mapping] = defaults,
  ) -> None:
      """Add a new set of defaults to the configuration
  
      It does two things:
  
      1.  Add the defaults to a global collection to be used by refresh later
      2.  Updates the global config with the new configuration.
          Old values are prioritized over new ones, unless the current value
          is the old default, in which case it's updated to the new default.
      """
      current_defaults = merge(*defaults)
      defaults.append(new)
      update(
          config,
          new,
          priority="new-defaults",
          defaults=current_defaults,
      )
  
imports: from __future__ import annotations
  import ast
  import base64
  import builtins
  import json
  import os
  import site
  import sys
  import threading
  import warnings
  from collections.abc import Mapping, Sequence
  from typing import Any, Literal
  import yaml
  from dask.typing import no_default
label_desc: Use image node_id 13 for calling a global function with example usage: update_defaults(new, config, defaults) without return types