code: def sparse_resize(self, sparse_sizes: Tuple[int, int]):
      assert len(sparse_sizes) == 2
      old_sparse_sizes, nnz = self._sparse_sizes, self._col.numel()
  
      diff_0 = sparse_sizes[0] - old_sparse_sizes[0]
      rowcount, rowptr = self._rowcount, self._rowptr
      if diff_0 > 0:
          if rowptr is not None:
              rowptr = torch.cat(
                  [rowptr, rowptr.new_full((diff_0,), nnz)]
              )
          if rowcount is not None:
              rowcount = torch.cat(
                  [rowcount, rowcount.new_zeros(diff_0)]
              )
      elif diff_0 < 0:
          if rowptr is not None:
              rowptr = rowptr[:diff_0]
          if rowcount is not None:
              rowcount = rowcount[:diff_0]
  
      diff_1 = sparse_sizes[1] - old_sparse_sizes[1]
      colcount, colptr = self._colcount, self._colptr
      if diff_1 > 0:
          if colptr is not None:
              colptr = torch.cat(
                  [colptr, colptr.new_full((diff_1,), nnz)]
              )
          if colcount is not None:
              colcount = torch.cat(
                  [colcount, colcount.new_zeros(diff_1)]
              )
      elif diff_1 < 0:
          if colptr is not None:
              colptr = colptr[:diff_1]
          if colcount is not None:
              colcount = colcount[:diff_1]
  
      return SparseStorage(
          row=self._row,
          rowptr=rowptr,
          col=self._col,
          value=self._value,
          sparse_sizes=sparse_sizes,
          rowcount=rowcount,
          colptr=colptr,
          colcount=colcount,
          csr2csc=self._csr2csc,
          csc2csr=self._csc2csr,
          is_sorted=True,
          trust_data=True,
      )
  
imports: import warnings
  from typing import List, Optional, Tuple
  import torch
  from torch_scatter import scatter_add, segment_csr
  from torch_sparse.utils import Final, index_sort
label_desc: Use image node_id 14 for calling the SparseStorage obj's underlying member method code with example usage: obj.sparse_resize(sparse_sizes) and returns: SparseStorage