code: def _check_targets(y_true, y_pred):
      """Check that y_true and y_pred belong to the same classification task
  
      This converts multiclass or binary types to a common shape, and raises a
      ValueError for a mix of multilabel and multiclass targets, a mix of
      multilabel formats, for the presence of continuous-valued or multioutput
      targets, or for targets of different lengths.
  
      Column vectors are squeezed to 1d, while multilabel formats are returned
      as CSR sparse label indicators.
  
      Parameters
      ----------
      y_true : array-like
  
      y_pred : array-like
  
      Returns
      -------
      type_true : one of {'multilabel-indicator', 'multiclass', 'binary'}
          The type of the true target data, as output by
          ``utils.multiclass.type_of_target``
  
      y_true : Tensor
  
      y_pred : Tensor
      """
      op = CheckTargets(y_true=y_true, y_pred=y_pred)
      return op(y_true, y_pred)
  
file_path: mars/mars/learn/metrics/_check_targets.py
imports: import numpy
  from ...None import opcodes
  from ...None import tensor
  from ...core import ENTITY_TYPE, ExecutableTuple, recursive_tile
  from ...core.context import get_context
  from ...serialization.serializables import AnyField
  from ...tensor.core import TENSOR_TYPE, TensorOrder
  from ..operands import LearnOperand, LearnOperandMixin, OutputType
  from ..utils.multiclass import type_of_target
  from ..utils import check_consistent_length, column_or_1d
label_desc: Use image node_id 1 for calling a global function with example usage: _check_targets(y_true, y_pred) and returns: op