code: def _mul_vector(self, other):
      result_shape = self.shape[0] if self.ndim > 1 else 1
      result = np.zeros(
          result_shape,
          dtype=upcast_char(self.dtype.char, other.dtype.char),
      )
  
      if self.ndim == 2:
          col = self.col
          row = self.row
      elif self.ndim == 1:
          col = self.indices[0]
          row = np.zeros_like(col)
      else:
          raise NotImplementedError(
              f"coo_matvec not implemented for ndim={self.ndim}"
          )
  
      coo_matvec(self.nnz, row, col, self.data, other, result)
      # Array semantics return a scalar here, not a single-element array.
      if isinstance(self, sparray) and result_shape == 1:
          return result[0]
      return result
  
imports: import math
  from warnings import warn
  import numpy
  from ._matrix import spmatrix
  from ._sparsetools import coo_tocsr, coo_todense, coo_matvec
  from ._base import issparse, SparseEfficiencyWarning, _spbase, sparray
  from ._data import _data_matrix, _minmax_mixin
  from ._sputils import upcast, upcast_char, to_native, isshape, getdtype, getdata, downcast_intp_index, get_index_dtype, check_shape, check_reshape_kwargs
  import operator
label_desc: Use image node_id 24 for calling the _coo_base obj's underlying member method code with example usage: obj._mul_vector(other) and returns: result, result