code: def _mul_scalar(self, other):
      res_dtype = upcast_scalar(self.dtype, other)
      # Multiply this scalar by every element.
      new = self._dok_container(self.shape, dtype=res_dtype)
      new._dict.update(((k, v * other) for k, v in self.items()))
      return new
  
imports: import itertools
  import numpy
  from ._matrix import spmatrix
  from ._base import _spbase, sparray, issparse
  from ._index import IndexMixin
  from ._sputils import isdense, getdtype, isshape, isintlike, isscalarlike, upcast, upcast_scalar, check_shape
label_desc: Use image node_id 31 for calling the _dok_base obj's underlying member method code with example usage: obj._mul_scalar(other) and returns: new