code: def array_to_buffer_object(array, mpi_dtype=mpi4py.MPI.FLOAT):
      xp = chainer.backend.get_array_module(array)
  
      if xp is np:
          return get_device_memory_pointer(array)
      else:
          return (get_device_memory_pointer(array), mpi_dtype)
  
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 7 for calling a global function with example usage: array_to_buffer_object(array, mpi_dtype) and returns: get_device_memory_pointer, get_device_memory_pointer,  mpi_dtype