code: def get_flat_kernel(self):
      from pycuda.tools import dtype_to_ctype
  
      mod = SourceModule(
          COO_FLAT_KERNEL_TEMPLATE
          % {
              "value_type": dtype_to_ctype(self.dtype),
              "tex_value_type": dtype_to_ctype(
                  self.dtype, with_fp_tex_hack=True
              ),
              "index_type": dtype_to_ctype(self.index_dtype),
              "block_size": self.block_size,
              "warp_size": drv.Context.get_device().warp_size,
          }
      )
      func = mod.get_function("spmv_coo_flat_kernel")
      x_texref = mod.get_texref("tex_x")
      func.prepare(
          self.index_dtype.char * 2 + "PPPP",
          (self.block_size, 1, 1),
          texrefs=[x_texref],
      )
      return func, x_texref
  
file_path: pycuda/pycuda/sparse/coordinate.py
imports: from __future__ import division
  from __future__ import absolute_import
  from pytools import memoize_method
  import pycuda.driver
  import pycuda.gpuarray
  from pycuda.compiler import SourceModule
  import numpy
label_desc: Use image node_id 2 for calling the CoordinateSpMV obj's underlying member method code with example usage: obj.get_flat_kernel() and returns: func,  x_texref