code: def _validate_target(y):
      """
      Raises a value error if the target is not a classification target.
      """
      # Ignore None values
      if y is None:
          return
  
      y_type = type_of_target(y)
      if y_type not in ("binary", "multiclass"):
          raise TypeError(
              "'{}' target type not supported, only binary and multiclass".format(
                  y_type
              )
          )
  
imports: import numpy
  import matplotlib.pyplot
  from ..telemetry import SKLearnEvaluationLogger
  from sklearn.utils.multiclass import unique_labels, type_of_target
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_target(y) without return types