code: def label_binarize(
      y,
      *,
      classes,
      neg_label=0,
      pos_label=1,
      sparse_output=False,
      execute=True,
  ):
      """Binarize labels in a one-vs-all fashion.
  
      Several regression and binary classification algorithms are
      available in scikit-learn. A simple way to extend these algorithms
      to the multi-class classification case is to use the so-called
      one-vs-all scheme.
  
      This function makes it possible to compute this transformation for a
      fixed set of class labels known ahead of time.
  
      Parameters
      ----------
      y : array-like
          Sequence of integer labels or multilabel data to encode.
  
      classes : array-like of shape (n_classes,)
          Uniquely holds the label for each class.
  
      neg_label : int, default=0
          Value with which negative labels must be encoded.
  
      pos_label : int, default=1
          Value with which positive labels must be encoded.
  
      sparse_output : bool, default=False,
          Set to true if output binary array is desired in CSR sparse format.
  
      Returns
      -------
      Y : {tensor, sparse tensor} of shape (n_samples, n_classes)
          Shape will be (n_samples, 1) for binary problems.
  
      Examples
      --------
      >>> from mars.learn.preprocessing import label_binarize
      >>> label_binarize([1, 6], classes=[1, 2, 4, 6])
      array([[1, 0, 0, 0],
             [0, 0, 0, 1]])
  
      The class ordering is preserved:
  
      >>> label_binarize([1, 6], classes=[1, 6, 4, 2])
      array([[1, 0, 0, 0],
             [0, 1, 0, 0]])
  
      Binary targets transform to a column vector
  
      >>> label_binarize(['yes', 'no', 'no', 'yes'], classes=['no', 'yes'])
      array([[1],
             [0],
             [0],
             [1]])
  
      See Also
      --------
      LabelBinarizer : Class used to wrap the functionality of label_binarize and
          allow for fitting to classes independently of the transform operation.
      """
      op = LabelBinarize(
          y=y,
          classes=classes,
          neg_label=neg_label,
          pos_label=pos_label,
          sparse_output=sparse_output,
      )
      result = op(y, classes)
      return result.execute() if execute else result
  
imports: from typing import Union
  import numpy
  import scipy.sparse
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.preprocessing import label_binarize
  from sklearn.utils.sparsefuncs import min_max_axis
  from ...None import execute, fetch
  from ...None import opcodes
  from ...None import tensor
  from ...core import ENTITY_TYPE, OutputType, recursive_tile
  from ...core.context import get_context, Context
  from ...lib.sparse import SparseNDArray
  from ...serialization.serializables import AnyField, BoolField, Int32Field, StringField
  from ...tensor.core import TensorOrder
  from ...typing import TileableType
  from ..operands import LearnOperand, LearnOperandMixin
  from ..utils import column_or_1d
  from ..utils._encode import _unique, _encode
  from ..utils.multiclass import unique_labels, type_of_target
  from ..utils.validation import _num_samples, check_is_fitted, check_array
label_desc: Use image node_id 1 for calling a global function with example usage: label_binarize(y) and returns: unknown