code: def test_update_defaults():
      defaults = [
          {"a": 1, "b": {"c": 1}},
          {"a": 2, "b": {"d": 2}},
      ]
      current = {"a": 2, "b": {"c": 1, "d": 3}, "extra": 0}
      new = {"a": 0, "b": {"c": 0, "d": 0}, "new-extra": 0}
      update_defaults(new, current, defaults=defaults)
  
      assert defaults == [
          {"a": 1, "b": {"c": 1}},
          {"a": 2, "b": {"d": 2}},
          {"a": 0, "b": {"c": 0, "d": 0}, "new-extra": 0},
      ]
      assert current == {
          "a": 0,
          "b": {"c": 0, "d": 3},
          "extra": 0,
          "new-extra": 0,
      }
  
imports: from __future__ import annotations
  import os
  import site
  import stat
  import sys
  from collections import OrderedDict
  from contextlib import contextmanager
  import pytest
  import yaml
  import dask.config
  from dask.config import _get_paths, canonical_name, collect, collect_env, collect_yaml, config, deserialize, ensure_file, expand_environment_variables, get, merge, pop, refresh, rename, serialize, update, update_defaults
  from dask.utils import tmpfile
label_desc: Use image node_id 4 for calling a global function with example usage: test_update_defaults() without return types