code: def _broadcast_to(array, shape, subok, readonly):
      shape = tuple(shape) if np.iterable(shape) else (shape,)
      array = np.array(array, copy=False, subok=subok)
      if not shape and array.shape:
          raise ValueError(
              "cannot broadcast a non-scalar to a scalar array"
          )
      if any(size < 0 for size in shape):
          raise ValueError(
              "all elements of broadcast shape must be non-" "negative"
          )
      needs_writeable = not readonly and array.flags.writeable
      extras = ["reduce_ok"] if needs_writeable else []
      op_flag = "readwrite" if needs_writeable else "readonly"
      broadcast = np.nditer(
          (array,),
          flags=["multi_index", "refs_ok", "zerosize_ok"] + extras,
          op_flags=[op_flag],
          itershape=shape,
          order="C",
      ).itviews[0]
      result = _maybe_view_as_subclass(array, broadcast)
      if needs_writeable and not result.flags.writeable:
          result.flags.writeable = True
      return result
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/cbook/_backports.py
imports: from __future__ import absolute_import
  import os
  import sys
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _broadcast_to(array, shape, subok, readonly) and returns: result