code: def _broadcast(value, target):
      """Broadcast a value to match the batching dimensions of a target.
  
      If necessary the value is converted into a tensor. Both value and target
      should be of the same dtype.
  
      Args:
        value: A value to broadcast.
        target: A `Tensor` of shape [b1, ..., bn, d].
  
      Returns:
        A `Tensor` of shape [b1, ..., bn] and same dtype as the target.
      """
      return tf.broadcast_to(
          tf.convert_to_tensor(value, dtype=target.dtype),
          ps.shape(target)[:-1],
      )
  
file_path: probability/tensorflow_probability/python/optimizer/bfgs_utils.py
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.optimizer.linesearch.hager_zhang import hager_zhang
label_desc: Use image node_id 12 for calling a global function with example usage: _broadcast(value, target) and returns: tf