code: def test_update_new_defaults():
      d = {"x": 1, "y": 1, "z": {"a": 1, "b": 1}}
      o = {
          "x": 1,
          "y": 2,
          "z": {"a": 1, "b": 2},
          "c": 2,
          "c2": {"d": 2},
      }
      n = {
          "x": 3,
          "y": 3,
          "z": OrderedDict({"a": 3, "b": 3}),
          "c": 3,
          "c2": {"d": 3},
      }
      assert update(o, n, priority="new-defaults", defaults=d) == {
          "x": 3,
          "y": 2,
          "z": {"a": 3, "b": 2},
          "c": 2,
          "c2": {"d": 2},
      }
      assert update(
          o, n, priority="new-defaults", defaults=o
      ) == update(o, n, priority="new")
      assert update(
          o, n, priority="new-defaults", defaults=None
      ) == update(o, n, priority="old")
  
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 3 for calling a global function with example usage: test_update_new_defaults() without return types