code: def test_all_negative_ones(self):
      neg_ones = -1 * np.ones(10)
  
      # Should behave as if pos_label=1
      assert metrics.true_positive_rate(neg_ones, neg_ones) == 0
      assert metrics.false_positive_rate(neg_ones, neg_ones) == 0
      assert metrics.true_negative_rate(neg_ones, neg_ones) == 1
      assert metrics.false_negative_rate(neg_ones, neg_ones) == 0
  
      assert (
          metrics.true_positive_rate(neg_ones, neg_ones, pos_label=1)
          == 0
      )
      assert (
          metrics.false_positive_rate(neg_ones, neg_ones, pos_label=1)
          == 0
      )
      assert (
          metrics.true_negative_rate(neg_ones, neg_ones, pos_label=1)
          == 1
      )
      assert (
          metrics.false_negative_rate(neg_ones, neg_ones, pos_label=1)
          == 0
      )
  
      assert (
          metrics.true_positive_rate(neg_ones, neg_ones, pos_label=-1)
          == 1
      )
      assert (
          metrics.false_positive_rate(neg_ones, neg_ones, pos_label=-1)
          == 0
      )
      assert (
          metrics.true_negative_rate(neg_ones, neg_ones, pos_label=-1)
          == 0
      )
      assert (
          metrics.false_negative_rate(neg_ones, neg_ones, pos_label=-1)
          == 0
      )
  
imports: import numpy
  import pytest
  import sklearn.metrics
  import fairlearn.metrics
  from fairlearn.metrics._base_metrics import _get_labels_for_confusion_matrix
label_desc: Use image node_id 3 for calling the TestSingleValueArrays obj's underlying member method code with example usage: obj.test_all_negative_ones() without return types