class_docstr: Provides common code for text vectorizers (tokenization logic).
class_docstr_tok: ["Provides","common","code","for","text","vectorizers","(","tokenization","logic",")","."]
docstr: Remove stop words only if needed.
docstr_tok: ["Remove","stop","words","only","if","needed","."]
code: def _remove_stop_words(self, doc):
      """
      Remove stop words only if needed.
      """
      if self.analyzer == "word" and self.stop_words is not None:
          stop_words = Series(self._get_stop_words())
          doc = doc.str.replace_tokens(
              stop_words,
              replacements=self.delimiter,
              delimiter=self.delimiter,
          )
      return doc
  
imports: from cuml.internals.safe_imports import cpu_only_import
  import cuml.internals.logger
  from cudf.utils.dtypes import min_signed_type
  from cuml.internals.type_utils import CUPY_SPARSE_DTYPES
  import numbers
  from cuml.internals.safe_imports import gpu_only_import
  from functools import partial
  from cuml.common.sparsefuncs import create_csr_matrix_from_count_df
  from cuml.common.sparsefuncs import csr_row_normalize_l1, csr_row_normalize_l2
  from cuml.feature_extraction._stop_words import ENGLISH_STOP_WORDS
  from cuml.common.exceptions import NotFittedError
  from cuml.internals.safe_imports import gpu_only_import_from
label_desc: Use image node_id 1 for calling the _VectorizerMixin obj's underlying member method code with example usage: obj._remove_stop_words(doc) and returns: doc