code: def test_BinaryMetrics(self):
      for metric_class, sklearn_metric in [
          (BinaryAccuracy, accuracy_score),
          (BinaryRecall, recall_score),
          (BinaryPrecision, precision_score),
          (BinaryF1Score, f1_score),
      ]:
          with self.subTest(metric_class=metric_class):
              metric = metric_class()
              predict = np.random.random_sample(1000)
              label = np.random.randint(0, 2, 1000)
              binary_predict = (predict > metric.threshold).astype(int)
              result = metric(predict, label)
              print(result.to_dict())
              self.assertEqual(result.metric_name, metric.metric_name)
              self.assertAlmostEqual(
                  result.result,
                  sklearn_metric(label, binary_predict),
                  places=7,
              )
  
file_path: FATE/python/fate/ml/evaluation/test/test_classi_metrci.py
imports: import unittest
  import numpy
  from sklearn.metrics import roc_auc_score, accuracy_score, recall_score, precision_score, f1_score
  from sklearn.preprocessing import LabelBinarizer
  from fate.ml.evaluation.classification import *
label_desc: Use image node_id 6 for calling the TestMetric obj's underlying member method code with example usage: obj.test_BinaryMetrics() without return types