class_docstr: Tests utility functions.
      
docstr: Tests :meth:`texar.tf.utils.dict_patch`.
          
docstr_tok: ["Tests",":","meth",":","`","texar.tf.utils.dict_patch","`","."]
code: def test_dict_patch(self):
      """Tests :meth:`texar.tf.utils.dict_patch`."""
      src_dict = {
          "k1": "k1",
          "k_dict_1": {"kd1_k1": "kd1_k1", "kd1_k2": "kd1_k2"},
          "k_dict_2": {"kd2_k1": "kd2_k1"},
      }
      tgt_dict = {
          "k1": "k1_tgt",
          "k_dict_1": {"kd1_k1": "kd1_k1"},
          "k_dict_2": "kd2_not_dict",
      }
  
      patched_dict = utils.dict_patch(tgt_dict, src_dict)
      self.assertEqual(patched_dict["k1"], tgt_dict["k1"])
      self.assertEqual(patched_dict["k_dict_1"], src_dict["k_dict_1"])
      self.assertEqual(patched_dict["k_dict_2"], tgt_dict["k_dict_2"])
  
file_path: texar/tests/utils/utils_test.py
imports: import tempfile
  import numpy
  import tensorflow
  from texar.tf.utils import utils
  from texar.tf.data.vocabulary import Vocab
label_desc: Use image node_id 1 for calling the UtilsTest obj's underlying member method code with example usage: obj.test_dict_patch() without return types