docstr: Collect results from many predict calls
docstr_tok: ["Collect","results","from","many","predict","calls"]
code: def _predict(self, X):
      """Collect results from many predict calls"""
      if isinstance(self, ClassifierMixin):
          dtype = "int64"
      else:
          dtype = "float64"
  
      if isinstance(X, da.Array):
          chunks = (X.chunks[0], len(self.estimators_))
          combined = X.map_blocks(
              _predict_stack,
              estimators=self.estimators_,
              dtype=np.dtype(dtype),
              chunks=chunks,
          )
      elif isinstance(X, dd._Frame):
          meta = np.empty((0, len(self.classes_)), dtype=dtype)
          combined = X.map_partitions(
              _predict_stack, estimators=self.estimators_, meta=meta
          )
      else:
          # TODO: this should be done in parallel?
          combined = np.vstack(
              [estimator.predict(X) for estimator in self.estimators_]
          ).T
  
      return combined
  
imports: import dask
  import dask.array
  import dask.dataframe
  import numpy
  import sklearn.base
  from sklearn.utils.validation import check_is_fitted
  from ..base import ClassifierMixin, RegressorMixin
  from ..utils import check_array
label_desc: Use image node_id 4 for calling the BlockwiseBase obj's underlying member method code with example usage: obj._predict(X) and returns: combined