code: def resize(self, *shape):
      shape = check_shape(shape)
      new_M, new_N = shape
      M, N = self.shape
  
      if new_M < M:
          self.rows = self.rows[:new_M]
          self.data = self.data[:new_M]
      elif new_M > M:
          self.rows = np.resize(self.rows, new_M)
          self.data = np.resize(self.data, new_M)
          for i in range(M, new_M):
              self.rows[i] = []
              self.data[i] = []
  
      if new_N < N:
          for row, data in zip(self.rows, self.data):
              trunc = bisect_left(row, new_N)
              del row[trunc:]
              del data[trunc:]
  
      self._shape = shape
  
imports: from bisect import bisect_left
  import numpy
  from ._matrix import spmatrix
  from ._base import _spbase, sparray, issparse
  from ._index import IndexMixin, INT_TYPES, _broadcast_arrays
  from ._sputils import getdtype, isshape, isscalarlike, upcast_scalar, check_shape, check_reshape_kwargs
  from .None import _csparsetools
label_desc: Use image node_id 32 for calling the _lil_base obj's underlying member method code with example usage: obj.resize() without return types