class_docstr: Distributed TF-IDF  transformer
  
  Examples
  --------
  .. code-block:: python
  
      >>> import cupy as cp
      >>> from sklearn.datasets import fetch_20newsgroups
      >>> from sklearn.feature_extraction.text import CountVectorizer
      >>> from dask_cuda import LocalCUDACluster
      >>> from dask.distributed import Client
      >>> from cuml.dask.common import to_sparse_dask_array
      >>> from cuml.dask.naive_bayes import MultinomialNB
      >>> import dask
      >>> from cuml.dask.feature_extraction.text import TfidfTransformer
  
      >>> # Create a local CUDA cluster
      >>> cluster = LocalCUDACluster()
      >>> client = Client(cluster)
  
      >>> # Load corpus
      >>> twenty_train = fetch_20newsgroups(subset='train',
      ...                         shuffle=True, random_state=42)
      >>> cv = CountVectorizer()
      >>> xformed = cv.fit_transform(twenty_train.data).astype(cp.float32)
      >>> X = to_sparse_dask_array(xformed, client)
  
      >>> y = dask.array.from_array(twenty_train.target, asarray=False,
      ...                     fancy=False).astype(cp.int32)
  
      >>> multi_gpu_transformer = TfidfTransformer()
      >>> X_transformed = multi_gpu_transformer.fit_transform(X)
      >>> X_transformed.compute_chunk_sizes()
      dask.array<...>
  
      >>> model = MultinomialNB()
      >>> model.fit(X_transformed, y)
      <cuml.dask.naive_bayes.naive_bayes.MultinomialNB object at 0x...>
      >>> result = model.score(X_transformed, y)
      >>> print(result) # doctest: +SKIP
      array(0.93264981)
      >>> client.close()
      >>> cluster.close()
class_docstr_tok: ["Distributed","TF-IDF","transformer","Examples","--","--","--","--","..","code-block",":",":","python",">",">",">","import","cupy","as","cp",">",">",">","from","sklearn.datasets","import","fetch_20newsgroups",">",">",">","from","sklearn.feature_extraction.text","import","CountVectorizer",">",">",">","from","dask_cuda","import","LocalCUDACluster",">",">",">","from","dask.distributed","import","Client",">",">",">","from","cuml.dask.common","import","to_sparse_dask_array",">",">",">","from","cuml.dask.naive_bayes","import","MultinomialNB",">",">",">","import","dask",">",">",">","from","cuml.dask.feature_extraction.text","import","TfidfTransformer",">",">",">","#","Create","a","local","CUDA","cluster",">",">",">","cluster","=","LocalCUDACluster","(",")",">",">",">","client","=","Client","(","cluster",")",">",">",">","#","Load","corpus",">",">",">","twenty_train","=","fetch_20newsgroups","(","subset='train","'",",","...","shuffle=True",",","random_state=42",")",">",">",">","cv","=","CountVectorizer","(",")",">",">",">","xformed","=","cv.fit_transform","(","twenty_train.data",")",".astype","(","cp.float32",")",">",">",">","X","=","to_sparse_dask_array","(","xformed",",","client",")",">",">",">","y","=","dask.array.from_array","(","twenty_train.target",",","asarray=False",",","...","fancy=False",")",".astype","(","cp.int32",")",">",">",">","multi_gpu_transformer","=","TfidfTransformer","(",")",">",">",">","X_transformed","=","multi_gpu_transformer.fit_transform","(","X",")",">",">",">","X_transformed.compute_chunk_sizes","(",")","dask.array","<","...",">",">",">",">","model","=","MultinomialNB","(",")",">",">",">","model.fit","(","X_transformed",",","y",")","<","cuml.dask.naive_bayes.naive_bayes.MultinomialNB","object","at","0x","...",">",">",">",">","result","=","model.score","(","X_transformed",",","y",")",">",">",">","print","(","result",")","#","doctest",":","+SKIP","array","(","0.93264981",")",">",">",">","client.close","(",")",">",">",">","cluster.close","(",")"]
code: def _merge_stats_to_model(models):
      modela = first(models)
      if modela.use_idf:
          for model in models[1:]:
              modela.__n_samples += model.__n_samples
              modela.__df += model.__df
      return modela
  
imports: import dask
  from toolz import first
  import dask.array
  from cuml.common import with_cupy_rmm
  from cuml.dask.common.base import BaseEstimator
  from cuml.dask.common.base import DelayedTransformMixin
  from cuml.dask.common.utils import wait_and_raise_from_futures
  from cuml.dask.common.func import reduce
  from cuml.dask.common.input_utils import DistributedDataHandler
  from cuml.feature_extraction.text import TfidfTransformer
label_desc: Use image node_id 3 for calling the TfidfTransformer obj's underlying member method code with example usage: obj._merge_stats_to_model(models) and returns: modela