code: def _memcpy_scatter():
      return cuda.elementwise(
          "raw T ptrs, raw X dtypes, raw Y info, raw float32 array",
          "",
          """
              int id_min = id_pre;
              int id_max = num_src;
              while (id_max - id_min > 1) {
                  int id = (id_max + id_min) / 2;
                  if (i < info[id]) id_max = id;
                  else              id_min = id;
              }
              int id = id_min;
  
              int i_src = i;
              int i_dst = i;
              if (id > 0) i_dst -= info[id];
  
              if (ptrs[id] != NULL) {
                  if (dtypes[id] == 0) { // fp32
                      float *dst = reinterpret_cast<float *>(ptrs[id]);
                      dst[i_dst] = array[i_src];
                  }
                  else { // fp16
                      float16 *dst = reinterpret_cast<float16 *>(ptrs[id]);
                      dst[i_dst] = static_cast<float16>(array[i_src]);
                  }
              }
              id_pre = id;
          """,
          "_memcpy_scatter",
          loop_prep="""
                  int num_src = info[0];
                  int id_pre = 0;
              """,
      )
  
imports: import multiprocessing
  import warnings
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer.dataset import convert
  from chainer import reporter
  from chainer.training.updaters import standard_updater
label_desc: Use image node_id 7 for calling a global function with example usage: _memcpy_scatter() and returns: cuda