class_docstr: Encodes any arbitrary string as a one-hot array.
  
  This featurizer uses the sklearn OneHotEncoder to create
  sparse matrix representation of a one-hot array of any string.
  It is expected to be used in large datasets that produces memory overload
  using standard featurizer such as OneHotFeaturizer. For example: SwissprotDataset
  
  
  Examples
  --------
  >>> import deepchem as dc
  >>> featurizer = dc.feat.SparseMatrixOneHotFeaturizer()
  >>> sequence = "MMMQLA"
  >>> encodings = featurizer.featurize([sequence])
  >>> encodings[0].shape
  (6, 25)
docstr: Use parent method of base clase Featurizer.
  
  Parameters
  ----------
  datapoint : list of string
      string to be converted to a sparse one hot matrix.
  
  Returns
  -------
  scipy sparse matrix
      A scipy sparse matrix of the one hot representation of the given string.
code: def _featurize(self, datapoint: Any, **kwargs):
      """Use parent method of base clase Featurizer.
  
      Parameters
      ----------
      datapoint : list of string
          string to be converted to a sparse one hot matrix.
  
      Returns
      -------
      scipy sparse matrix
          A scipy sparse matrix of the one hot representation of the given string.
  
      """
      # Featurize str data
      if isinstance(datapoint, (str, np.str_)):
          sequence = np.array(list(datapoint)).reshape(-1, 1)
          sparse_mat = self.ohe.fit_transform(sequence)
          return sparse_mat
      else:
          raise ValueError("Datapoint is not a string")
  
file_path: deepchem/deepchem/feat/molecule_featurizers/sparse_matrix_one_hot_featurizer.py
imports: import logging
  from typing import List
  import numpy
  import scipy
  from deepchem.feat.base_classes import Featurizer
  from typing import Any, Iterable
label_desc: Use image node_id 3 for calling the SparseMatrixOneHotFeaturizer obj's underlying member method code with example usage: obj._featurize(datapoint) and returns: sparse_mat