docstr: Performs a brief validation that a model meets the requirements
  to be set as an `internal_model`
  
  Parameters
  ----------
  
  model : distributed.client.Future[cuml.Base], cuml.Base, or None
  
  Returns
  -------
  
  model : distributed.client.Future[cuml.Base], cuml.Base, or None
docstr_tok: ["Performs","a","brief","validation","that","a","model","meets","the","requirements","to","be","set","as","an","`","internal_model","`","Parameters","--","--","--","--","--","model",":","distributed.client.Future","[","cuml.Base","]",",","cuml.Base",",","or","None","Returns","--","--","--","-","model",":","distributed.client.Future","[","cuml.Base","]",",","cuml.Base",",","or","None"]
code: def _check_internal_model(model):
      """
      Performs a brief validation that a model meets the requirements
      to be set as an `internal_model`
  
      Parameters
      ----------
  
      model : distributed.client.Future[cuml.Base], cuml.Base, or None
  
      Returns
      -------
  
      model : distributed.client.Future[cuml.Base], cuml.Base, or None
  
      """
      if isinstance(model, Iterable):
          # If model is iterable, just grab the first
          model = first(model)
  
      if isinstance(model, Future):
          if model.type is None:
              wait_and_raise_from_futures([model])
  
          if not issubclass(model.type, Base):
              raise ValueError(
                  "Dask Future expected to contain cuml.Base "
                  "but found %s instead." % model.type
              )
  
      elif model is not None and not isinstance(model, Base):
          raise ValueError(
              "Expected model of type cuml.Base but found %s "
              "instead." % type(model)
          )
      return 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 6 for calling the BaseEstimator obj's underlying member method code with example usage: obj._check_internal_model(model) and returns: model