class_docstr: Helper class to make it easier to manage caching in `Bijector`.
class_docstr_tok: ["Helper","class","to","make","it","easier","to","manage","caching","in","`","Bijector","`","."]
docstr: Helper to merge two dictionaries.
code: def _merge_dicts(self, old=None, new=None):
      """Helper to merge two dictionaries."""
      old = {} if old is None else old
      new = {} if new is None else new
      for k, v in new.items():
          val = old.get(k, None)
          if val is not None and val is not v:
              raise ValueError(
                  "Found different value for existing key "
                  "(key:{} old_value:{} new_value:{}".format(
                      k, old[k], v
                  )
              )
          old[k] = v
      return old
  
imports: import abc
  import collections
  import contextlib
  import re
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.distributions import util
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 5 for calling the _Mapping obj's underlying member method code with example usage: obj._merge_dicts(old, new) and returns: old