class_docstr: Implements the TF backend ops for a PC auto-batching VM.
docstr: Merges two dtypes, returning a compatible dtype.
  
  In practice, TF implementation asserts that the two dtypes are identical.
  
  Args:
    dt1: A numpy dtype, or None.
    dt2: A numpy dtype, or None.
  
  Returns:
    dtype: The common numpy dtype.
  
  Raises:
    ValueError: If dt1 and dt2 are not equal and both are non-`None`.
docstr_tok: ["Merges","two","dtypes",",","returning","a","compatible","dtype",".","In","practice",",","TF","implementation","asserts","that","the","two","dtypes","are","identical",".","Args",":","dt1",":","A","numpy","dtype",",","or","None",".","dt2",":","A","numpy","dtype",",","or","None",".","Returns",":","dtype",":","The","common","numpy","dtype",".","Raises",":","ValueError",":","If","dt1","and","dt2","are","not","equal","and","both","are","non-","`","None","`","."]
code: def merge_dtypes(self, dt1, dt2):
      """Merges two dtypes, returning a compatible dtype.
  
      In practice, TF implementation asserts that the two dtypes are identical.
  
      Args:
        dt1: A numpy dtype, or None.
        dt2: A numpy dtype, or None.
  
      Returns:
        dtype: The common numpy dtype.
  
      Raises:
        ValueError: If dt1 and dt2 are not equal and both are non-`None`.
      """
      if None in (dt1, dt2):
          return dt1 or dt2
      if tf.as_dtype(dt1) == tf.as_dtype(dt2):
          return dtype_util.as_numpy_dtype(tf.as_dtype(dt1))
      raise ValueError("Mismatched dtypes {} vs {}".format(dt1, dt2))
  
imports: import collections
  import contextlib
  import six
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import xla
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow.python.ops import control_flow_util
label_desc: Use image node_id 5 for calling the TensorFlowBackend obj's underlying member method code with example usage: obj.merge_dtypes(dt1, dt2) and returns: unknown, dtype_util