code: def merge_with(x, other):
      """Returns a shape combining the information in `x` and `other`.
  
      The dimensions in `x` and `other` are merged elementwise, according to the
      rules defined for `tf.Dimension.merge_with()`.
  
      For more details, see `help(tf.TensorShape.merge_with)`.
  
      Args:
        x: object representing a shape; convertible to `tf.TensorShape`.
        other: object representing a shape; convertible to `tf.TensorShape`.
  
      Returns:
        merged_shape: shape having `type(x)` containing the combined information of
          `x` and `other`.
  
      Raises:
        ValueError: If `x` and `other` are not compatible.
      """
      return _cast_tensorshape(
          tf.TensorShape(x).merge_with(other), type(x)
      )
  
file_path: probability/tensorflow_probability/python/internal/tensorshape_util.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
label_desc: Use image node_id 10 for calling a global function with example usage: merge_with(x, other) and returns: _cast_tensorshape