code: def test_invalid_labels_2():
      y1 = np.where(y0 == 0, -1, 1)
      ppn = Perceptron(epochs=15, eta=0.01, random_seed=1)
  
      assert_raises(
          AttributeError,
          "y array must not contain negative labels.\nFound [-1  1]",
          ppn.fit,
          X,
          y1,
          {(-1, 1)},
      )
  
file_path: mlxtend/mlxtend/classifier/tests/test_perceptron.py
imports: import sys
  import numpy
  from sklearn.base import clone
  from mlxtend.classifier import Perceptron
  from mlxtend.data import iris_data
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_invalid_labels_2() without return types