code: def is_multilabel(y):
      """
      Check if ``y`` is in a multilabel format.
  
      Parameters
      ----------
      y : numpy array of shape [n_samples]
          Target values.
  
      Returns
      -------
      out : bool,
          Return ``True``, if ``y`` is in a multilabel format, else ```False``.
  
      Examples
      --------
      >>> import mars.tensor as mt
      >>> from mars.learn.utils.multiclass import is_multilabel
      >>> is_multilabel([0, 1, 0, 1]).execute()
      False
      >>> is_multilabel([[1], [0, 2], []]).execute()
      False
      >>> is_multilabel(mt.array([[1, 0], [0, 0]])).execute()
      True
      >>> is_multilabel(mt.array([[1], [0], [0]])).execute()
      False
      >>> is_multilabel(mt.array([[1, 0, 0]])).execute()
      True
      """
      if not isinstance(y, ENTITY_TYPE):
          if hasattr(y, "__array__") or isinstance(y, Sequence):
              y = np.asarray(y)
          yt = None
      else:
          yt = y = mt.tensor(y)
  
      op = IsMultilabel(y=y)
      return op(yt)
  
imports: import itertools
  from collections.abc import Sequence
  from typing import List
  import numpy
  from scipy.sparse import spmatrix
  from sklearn.utils.multiclass import is_multilabel, type_of_target
  from ...None import opcodes
  from ...None import tensor
  from ...core import ENTITY_TYPE, TILEABLE_TYPE, recursive_tile
  from ...core.context import get_context
  from ...serialization.serializables import AnyField, ListField
  from ...tensor.core import TensorOrder, TENSOR_TYPE
  from ...typing import TileableType
  from ...utils import has_unknown_shape
  from ..operands import LearnOperand, LearnOperandMixin, OutputType
  from ..utils import assert_all_finite
  from .validation import check_array
label_desc: Use image node_id 4 for calling a global function with example usage: is_multilabel(y) and returns: op