code: def test_roc_curve_drop_intermediate(setup):
      # Test that drop_intermediate drops the correct thresholds
      y_true = [0, 0, 0, 0, 1, 1]
      y_score = [0.0, 0.2, 0.5, 0.6, 0.7, 1.0]
      tpr, fpr, thresholds = roc_curve(
          y_true, y_score, drop_intermediate=True
      )
      np.testing.assert_array_almost_equal(
          thresholds.fetch(), [2.0, 1.0, 0.7, 0.0]
      )
  
      # Test dropping thresholds with repeating scores
      y_true = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
      y_score = [
          0.0,
          0.1,
          0.6,
          0.6,
          0.7,
          0.8,
          0.9,
          0.6,
          0.7,
          0.8,
          0.9,
          0.9,
          1.0,
      ]
      tpr, fpr, thresholds = roc_curve(
          y_true, y_score, drop_intermediate=True
      )
      np.testing.assert_array_almost_equal(
          thresholds.fetch(), [2.0, 1.0, 0.9, 0.7, 0.6, 0.0]
      )
  
imports: import re
  import warnings
  import numpy
  import pandas
  import pytest
  from sklearn.metrics import roc_curve, auc, accuracy_score
  from sklearn.metrics.tests.test_ranking import make_prediction, _auc
  from sklearn.exceptions import UndefinedMetricWarning
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_almost_equal, assert_array_almost_equal
  from ....None import dataframe
  from ....None import tensor
  from ...utils.extmath import softmax
  from ..None import roc_curve, auc, accuracy_score, roc_auc_score
label_desc: Use image node_id 10 for calling a global function with example usage: test_roc_curve_drop_intermediate(setup) without return types