code: def ref_broadcast_to(x, y, axis):
      if axis < 0 or copying_to_leaf(x, y, axis):
          # Copy data to leaf
          return np.ones(x.shape) * y
      # Copy data from specified axis
      xs = len(x.shape)
      ys = len(y.shape)
      if xs == 2:
          t = y[:, np.newaxis]
          t.transpose()
          return np.broadcast_to(t, x.shape)
      elif xs == 3:
          if ys == 1:
              if axis == 0:
                  t = y[:, np.newaxis, np.newaxis]
                  t.transpose()
                  return np.broadcast_to(t, x.shape)
              elif axis == 1:
                  t = y[np.newaxis, :, np.newaxis]
                  t.transpose()
                  return np.broadcast_to(t, x.shape)
          elif ys == 2:
              if axis == 0:
                  t = y[:, :, np.newaxis]
                  return np.broadcast_to(t, x.shape)
      elif xs == 4:
          if ys == 1:
              if axis == 0:
                  t = y[:, np.newaxis, np.newaxis, np.newaxis]
                  t.transpose()
                  return np.broadcast_to(t, x.shape)
              elif axis == 1:
                  t = y[np.newaxis, :, np.newaxis, np.newaxis]
                  t.transpose()
                  return np.broadcast_to(t, x.shape)
              elif axis == 2:
                  t = y[np.newaxis, np.newaxis, :, np.newaxis]
                  t.transpose()
                  return np.broadcast_to(t, x.shape)
          elif ys == 2:
              if axis == 0:
                  t = y[:, :, np.newaxis, np.newaxis]
                  return np.broadcast_to(t, x.shape)
              elif axis == 1:
                  t = y[np.newaxis, :, :, np.newaxis]
                  return np.broadcast_to(t, x.shape)
          elif ys == 3:
              if axis == 0:
                  t = y[:, :, :, np.newaxis]
                  return np.broadcast_to(t, x.shape)
  
imports: import pytest
  import numpy
  import nnabla.functions
  from nbla_test_utils import function_tester, list_ctx_and_func_name
label_desc: Use image node_id 2 for calling a global function with example usage: ref_broadcast_to(x, y, axis) and returns: unknown, np, np, np, np, np, np, np, np, np, np