code: def check_classification_targets(y):
      """
      Ensure that target y is of a non-regression type.
  
      Only the following target types (as defined in type_of_target) are allowed:
          'binary', 'multiclass', 'multiclass-multioutput',
          'multilabel-indicator', 'multilabel-sequences'
  
      Parameters
      ----------
      y : array-like
      """
      y_type = type_of_target(y)
  
      def check(t):
          if t not in [
              "binary",
              "multiclass",
              "multiclass-multioutput",
              "multilabel-indicator",
              "multilabel-sequences",
          ]:
              raise ValueError("Unknown label type: %r" % t)
          return t
  
      y_type = y_type.map_chunk(check, dtype=y_type.dtype)
      return y_type
  
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 6 for calling a global function with example usage: check_classification_targets(y) and returns: y_type, t