code: def test_score_to_label(self):
      manual_scores = [0.1, 0.4, 0.2, 0.3, 0.5, 0.9, 0.7, 1, 0.8, 0.6]
      labels = score_to_label(manual_scores, outliers_fraction=0.1)
      assert_allclose(labels, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0])
  
      labels = score_to_label(manual_scores, outliers_fraction=0.3)
      assert_allclose(labels, [0, 0, 0, 0, 0, 1, 0, 1, 1, 0])
  
imports: from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import unittest
  import numpy
  from numpy.testing import assert_allclose
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from sklearn.metrics import precision_score
  from sklearn.utils import check_random_state
  from pyod.utils.utility import check_parameter
  from pyod.utils.utility import standardizer
  from pyod.utils.utility import get_label_n
  from pyod.utils.utility import precision_n_scores
  from pyod.utils.utility import argmaxn
  from pyod.utils.utility import get_list_diff
  from pyod.utils.utility import get_diff_elements
  from pyod.utils.utility import get_intersection
  from pyod.utils.utility import invert_order
  from pyod.utils.utility import check_detector
  from pyod.utils.utility import score_to_label
label_desc: Use image node_id 6 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_score_to_label() without return types