docstr: Assigns model (a Future or list of futures containins a single-GPU
  model) to be an internal model.
  
  This function standardizes upon the way we set the internal model
  so that it could either be futures, a single future, or a class local
  to the client.
  
  In order for `get_combined model()` to provide a consistent output,
  self.internal_model is expected to be either a single future
  containing a cuml.Base instance or a local cuml.Base on the client.
  An iterable can be passed into this method when a trained model
  has been replicated across the workers. In this case, only the
  first element of the iterable will be set as the internal_model
  
  If multiple different parameters have been trained across the cluster,
  such as in RandomForests or some approx. nearest neighbors algorithms,
  they should be combined into a single model and the combined model
  should be passed to `set_internal_model()`
  
  Parameters
  ----------
  
  model : distributed.client.Future[cuml.Base], cuml.Base, or None
docstr_tok: ["Assigns","model","(","a","Future","or","list","of","futures","containins","a","single-GPU","model",")","to","be","an","internal","model",".","This","function","standardizes","upon","the","way","we","set","the","internal","model","so","that","it","could","either","be","futures",",","a","single","future",",","or","a","class","local","to","the","client",".","In","order","for","`","get_combined","model","(",")","`","to","provide","a","consistent","output",",","self.internal_model","is","expected","to","be","either","a","single","future","containing","a","cuml.Base","instance","or","a","local","cuml.Base","on","the","client",".","An","iterable","can","be","passed","into","this","method","when","a","trained","model","has","been","replicated","across","the","workers",".","In","this","case",",","only","the","first","element","of","the","iterable","will","be","set","as","the","internal_model","If","multiple","different","parameters","have","been","trained","across","the","cluster",",","such","as","in","RandomForests","or","some","approx",".","nearest","neighbors","algorithms",",","they","should","be","combined","into","a","single","model","and","the","combined","model","should","be","passed","to","`","set_internal_model","(",")","`","Parameters","--","--","--","--","--","model",":","distributed.client.Future","[","cuml.Base","]",",","cuml.Base",",","or","None"]
code: def _set_internal_model(self, model):
      """
      Assigns model (a Future or list of futures containins a single-GPU
      model) to be an internal model.
  
      This function standardizes upon the way we set the internal model
      so that it could either be futures, a single future, or a class local
      to the client.
  
      In order for `get_combined model()` to provide a consistent output,
      self.internal_model is expected to be either a single future
      containing a cuml.Base instance or a local cuml.Base on the client.
      An iterable can be passed into this method when a trained model
      has been replicated across the workers. In this case, only the
      first element of the iterable will be set as the internal_model
  
      If multiple different parameters have been trained across the cluster,
      such as in RandomForests or some approx. nearest neighbors algorithms,
      they should be combined into a single model and the combined model
      should be passed to `set_internal_model()`
  
      Parameters
      ----------
  
      model : distributed.client.Future[cuml.Base], cuml.Base, or None
  
      """
      self.internal_model = self._check_internal_model(model)
  
imports: from distributed.client import Future
  from functools import wraps
  from dask_cudf.core import Series
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.base import Base
  from cuml.internals import BaseMetaClass
  from cuml.dask.common import parts_to_ranks
  from cuml.dask.common.input_utils import DistributedDataHandler
  from raft_dask.common.comms import Comms
  from cuml.dask.common.utils import wait_and_raise_from_futures
  from cuml.internals.array import CumlArray
  from cuml.dask.common.utils import get_client
  from collections.abc import Iterable
  from toolz import first
  from cuml.internals.safe_imports import cpu_only_import
  import dask
  import cudf.comm.serialize
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 5 for calling the BaseEstimator obj's underlying member method code with example usage: obj._set_internal_model(model) without return types