code: def grad_broadcast_to(ans, x, new_shape):
      old_shape = anp.shape(x)
      assert anp.shape(ans) == new_shape
      assert len(old_shape) == len(
          new_shape
      ), "Can't handle extra leading dims"
      broadcast_axes = tuple(
          onp.where(
              onp.logical_and(
                  onp.array(old_shape) == 1, onp.array(new_shape) > 1
              )
          )[0]
      )
      return lambda g: anp.sum(g, axis=broadcast_axes, keepdims=True)
  
imports: from __future__ import absolute_import
  from six import string_types
  from functools import partial
  import numpy
  from ..util import func
  from .None import numpy_wrapper
  from .numpy_boxes import ArrayBox
  from autograd.extend import primitive, vspace, defvjp, defvjp_argnum, SparseObject, VJPNode, register_notrace
label_desc: Use image node_id 9 for calling a global function with example usage: grad_broadcast_to(ans, x, new_shape) and returns: function