code: def test_update_dictionary():
      """Tests for update_dictionary"""
      # no conflicts, takes union
      default_dict = {"a": 1, "d": 4}
      overwrite_dict = {"b": 2, "c": 3}
      merged_dict = update_dictionary(
          default_dict, overwrite_dict=overwrite_dict
      )
      assert merged_dict == {"a": 1, "b": 2, "c": 3, "d": 4}
  
      # overwrite takes precedence in conflicts
      default_dict = {"a": 1, "d": 4}
      overwrite_dict = {"a": 2, "c": 3}
      merged_dict = update_dictionary(
          default_dict, overwrite_dict=overwrite_dict
      )
      assert merged_dict == {"a": 2, "c": 3, "d": 4}
  
      # overwrite can be None or {}
      default_dict = {"a": 1, "b": 4}
      merged_dict = update_dictionary(default_dict, overwrite_dict=None)
      assert merged_dict == default_dict
      merged_dict = update_dictionary(default_dict, overwrite_dict={})
      assert merged_dict == default_dict
  
      default_dict = {"a": 1, "b": 4, "c": 5}
      overwrite_dict = {"a": 1, "b": 4}
      update_dictionary(
          default_dict,
          overwrite_dict=overwrite_dict,
          allow_unknown_keys=False,
      )
      # overwrite cannot be a strict superset of default
      with pytest.raises(
          ValueError, match=r"Unexpected key\(s\) found"
      ):
          overwrite_dict = {"a": 1, "b": 4, "d": 1}
          update_dictionary(
              default_dict,
              overwrite_dict=overwrite_dict,
              allow_unknown_keys=False,
          )
  
imports: import warnings
  from dataclasses import dataclass
  from typing import List
  import numpy
  import pandas
  import pytest
  import scipy
  from greykite.common import constants
  from greykite.common.evaluation import ElementwiseEvaluationMetricEnum
  from greykite.common.python_utils import apply_func_to_columns
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import dictionaries_values_to_lists
  from greykite.common.python_utils import dictionary_values_to_lists
  from greykite.common.python_utils import flatten_list
  from greykite.common.python_utils import get_integer
  from greykite.common.python_utils import get_pattern_cols
  from greykite.common.python_utils import group_strs_with_regex_patterns
  from greykite.common.python_utils import ignore_warnings
  from greykite.common.python_utils import mutable_field
  from greykite.common.python_utils import reorder_columns
  from greykite.common.python_utils import split_offset_str
  from greykite.common.python_utils import unique_dict_in_list
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.python_utils import unique_in_list
  from greykite.common.python_utils import update_dictionaries
  from greykite.common.python_utils import update_dictionary
label_desc: Use image node_id 1 for calling a global function with example usage: test_update_dictionary() without return types