code: def predict(model, x):
      """Predict with a scikit learn model
  
      Parameters
      ----------
      model : scikit learn classifier
      x : dask Array
  
      See docstring for ``da.learn.fit``
      """
      func = partial(_predict, model)
  
      if getattr(model, "feature_names_in_", None) is not None:
          meta = model.predict(x._meta_nonempty)
          return x.map_partitions(func, meta=meta)
      else:
          if len(x.chunks[1]) > 1:
              x = x.rechunk(chunks=(x.chunks[0], sum(x.chunks[1])))
  
          xx = np.zeros((1, x.shape[1]), dtype=x.dtype)
          meta = model.predict(xx)
  
          if meta.ndim > 1:
              chunks = (x.chunks[0], (1,))
              drop_axis = None
          else:
              chunks = (x.chunks[0],)
              drop_axis = 1
          return x.map_blocks(
              func, chunks=chunks, meta=meta, drop_axis=drop_axis
          )
  
file_path: dask-ml/dask_ml/_partial.py
imports: from __future__ import absolute_import, division, print_function
  import logging
  import os
  import dask
  import numpy
  import sklearn.utils
  from dask.delayed import Delayed
  from dask.highlevelgraph import HighLevelGraph
  from toolz import partial
  from ._compat import DASK_2022_01_0
label_desc: Use image node_id 5 for calling a global function with example usage: predict(model, x) and returns: x, x