code: def test_broadcast():
      sample_num = 1000
  
      def test_broadcast_to():
          for i in range(sample_num):
              ndim = np.random.randint(1, 6)
              target_shape = np.random.randint(1, 11, size=ndim)
              shape = target_shape.copy()
              axis_flags = np.random.randint(0, 2, size=ndim)
              axes = []
              for axis, flag in enumerate(axis_flags):
                  if flag:
                      shape[axis] = 1
              dat = np.random.rand(*shape) - 0.5
              numpy_ret = dat
              ndarray_ret = mx.nd.array(dat).broadcast_to(
                  shape=target_shape
              )
              if type(ndarray_ret) is mx.ndarray.NDArray:
                  ndarray_ret = ndarray_ret.asnumpy()
              assert (ndarray_ret.shape == target_shape).all()
              err = np.square(ndarray_ret - numpy_ret).mean()
              assert err < 1e-8
  
      test_broadcast_to()
  
imports: import os
  import mxnet
  import numpy
  import pickle
label_desc: Use image node_id 20 for calling a global function with example usage: test_broadcast() without return types