code: def find_simple_index_stuff(self, packet_nr_to_dofs):
      new2old_fetch_indices = np.zeros(
          self.shape[0], dtype=self.index_dtype
      )
      old2new_fetch_indices = np.zeros(
          self.shape[0], dtype=self.index_dtype
      )
  
      packet_base_rows = np.zeros(
          self.block_count + 1, dtype=self.index_dtype
      )
  
      row_start = 0
      for packet_nr, packet in enumerate(packet_nr_to_dofs):
          packet_base_rows[packet_nr] = row_start
          row_end = row_start + len(packet)
  
          pkt_indices = np.array(packet, dtype=self.index_dtype)
          new2old_fetch_indices[row_start:row_end] = pkt_indices
          old2new_fetch_indices[pkt_indices] = np.arange(
              row_start, row_end, dtype=self.index_dtype
          )
  
          row_start += len(packet)
  
      packet_base_rows[self.block_count] = row_start
  
      return (
          new2old_fetch_indices,
          old2new_fetch_indices,
          packet_base_rows,
      )
  
file_path: pycuda/pycuda/sparse/packeted.py
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from pytools import memoize_method
  import pycuda.gpuarray
  from pycuda.compiler import SourceModule
  import numpy
label_desc: Use image node_id 2 for calling the PacketedSpMV obj's underlying member method code with example usage: obj.find_simple_index_stuff(packet_nr_to_dofs) and returns: new2old_fetch_indices,  old2new_fetch_indices,  packet_base_rows