code: def _get_memory_pointer_from_chainerx(array):
      # Currently, ChainerMN requires CuPy to support ChainerX.
      # This is because ChainerX's backend does not provide a raw
      # memory pointer class.
      return cp.cuda.MemoryPointer(
          cp.cuda.UnownedMemory(
              array.data_ptr + array.offset,
              array.data_size,
              array,
              array.device.index,
          ),
          0,
      )
  
imports: import ctypes
  import mpi4py.MPI
  import numpy
  from chainermn.communicators import _communication_utility
  import chainer.backends
  import chainerx
label_desc: Use image node_id 1 for calling a global function with example usage: _get_memory_pointer_from_chainerx(array) and returns: cp