code: def _mat_ptrs(a):
      """Creates an array of pointers to matrices
  
      Args:
          a: A batch of matrices on GPU.
      Returns:
          GPU array of pointers to matrices.
      """
      if len(a) == 1:
          return cuda.cupy.full((1,), a.data.ptr, dtype=numpy.uintp)
      else:
          stride = a.strides[0]
          ptr = a.data.ptr
          return cuda.cupy.arange(
              ptr, ptr + stride * len(a), stride, dtype=numpy.uintp
          )
  
imports: import warnings
  import numpy
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  import chainer.functions
  from chainer import utils
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 1 for calling a global function with example usage: _mat_ptrs(a) and returns: cuda, cuda