code: def broadcast(x, target):
      (
          target_shape,
          target_ndim,
          target_dtype,
          target_iscomplex,
      ) = anp.metadata(target)
      while anp.ndim(x) < target_ndim:
          x = anp.expand_dims(x, 0)
      for axis, size in enumerate(anp.shape(x)):
          if size == 1:
              x = anp.repeat(x, target_shape[axis], axis=axis)
      if target_iscomplex and not anp.iscomplexobj(x):
          x = x + 0j  # TODO(mattjj): this might promote the dtype
      return x
  
file_path: autograd/autograd/numpy/numpy_jvps.py
imports: from .None import numpy_wrapper
  from .numpy_vjps import untake, balanced_eq, match_complex, replace_zero, dot_adjoint_0, dot_adjoint_1, tensordot_adjoint_0, tensordot_adjoint_1, nograd_functions
  from autograd.extend import defjvp, defjvp_argnum, def_linear, vspace, JVPNode, register_notrace
  from ..util import func
  from .numpy_boxes import ArrayBox
label_desc: Use image node_id 8 for calling a global function with example usage: broadcast(x, target) and returns: x