code: def to_indexable(*args, **kwargs):
      """Ensure that all args are an indexable type.
  
      Conversion runs lazily for dask objects, immediately otherwise.
  
      Parameters
      ----------
      args : array_like or scalar
      allow_scalars : bool, optional
          Whether to allow scalars in args. Default is False.
      """
      if kwargs.get("allow_scalars", False):
          indexable = _maybe_indexable
      else:
          indexable = _indexable
      for x in args:
          if x is None or isinstance(x, (da.Array, dd.DataFrame)):
              yield x
          elif is_dask_collection(x):
              yield delayed(indexable, pure=True)(x)
          else:
              yield indexable(x)
  
imports: import copy
  import warnings
  from itertools import compress
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import packaging.version
  import scipy.sparse
  from dask.base import tokenize
  from dask.delayed import Delayed, delayed
  from sklearn.utils.validation import _is_arraylike, indexable
  from ..utils import _num_samples
label_desc: Use image node_id 3 for calling a global function with example usage: to_indexable() without return types