code: def testFairnessIndicatorsAtDefaultThresholds(self):
      temp_eval_export_dir = self._getEvalExportDir()
      (
          _,
          eval_export_dir,
      ) = fixed_prediction_estimator_extra_fields.simple_fixed_prediction_estimator_extra_fields(
          None, temp_eval_export_dir
      )
      examples = self.makeConfusionMatrixExamples()
      fairness_metrics = post_export_metrics.fairness_indicators()
  
      def check_result(got):  # pylint: disable=invalid-name
          try:
              self.assertEqual(1, len(got), "got: %s" % got)
              (slice_key, value) = got[0]
              self.assertEqual((), slice_key)
              expected_values_dict = {
                  metric_keys.base_key("true_positive_rate@0.10"): 2.0
                  / 3.0,
                  metric_keys.base_key("false_positive_rate@0.10"): 1.0
                  / 2.0,
                  metric_keys.base_key("positive_rate@0.10"): 3.0 / 5.0,
                  metric_keys.base_key("true_negative_rate@0.10"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_negative_rate@0.10"): 1.0
                  / 3.0,
                  metric_keys.base_key("negative_rate@0.10"): 2.0 / 5.0,
                  metric_keys.base_key("true_positive_rate@0.20"): 2.0
                  / 3.0,
                  metric_keys.base_key("true_positive_rate@0.30"): 2.0
                  / 3.0,
                  metric_keys.base_key("true_positive_rate@0.40"): 2.0
                  / 3.0,
                  metric_keys.base_key("true_positive_rate@0.50"): 2.0
                  / 3.0,
                  metric_keys.base_key("true_positive_rate@0.60"): 2.0
                  / 3.0,
                  metric_keys.base_key("true_positive_rate@0.70"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_positive_rate@0.70"): 1.0
                  / 2.0,
                  metric_keys.base_key("positive_rate@0.70"): 2.0 / 5.0,
                  metric_keys.base_key("true_negative_rate@0.70"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_negative_rate@0.70"): 2.0
                  / 3.0,
                  metric_keys.base_key("negative_rate@0.70"): 3.0 / 5.0,
                  metric_keys.base_key("positive_rate@0.80"): 1.0 / 5.0,
                  metric_keys.base_key("true_positive_rate@0.90"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_positive_rate@0.90"): 0.0
                  / 2.0,
                  metric_keys.base_key("positive_rate@0.90"): 1.0 / 5.0,
                  metric_keys.base_key("true_negative_rate@0.90"): 2.0
                  / 2.0,
                  metric_keys.base_key("false_negative_rate@0.90"): 2.0
                  / 3.0,
                  metric_keys.base_key("negative_rate@0.90"): 4.0 / 5.0,
                  metric_keys.base_key("false_discovery_rate@0.10"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.10"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.20"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.20"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.30"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.30"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.40"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.40"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.50"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.50"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.60"): 1.0
                  / 3.0,
                  metric_keys.base_key("false_omission_rate@0.60"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_discovery_rate@0.70"): 1.0
                  / 2.0,
                  metric_keys.base_key("false_omission_rate@0.70"): 2.0
                  / 3.0,
                  metric_keys.base_key("false_discovery_rate@0.80"): 0,
                  metric_keys.base_key("false_omission_rate@0.80"): 2.0
                  / 4.0,
                  metric_keys.base_key("false_discovery_rate@0.90"): 0,
                  metric_keys.base_key("false_omission_rate@0.90"): 2.0
                  / 4.0,
              }
              self.assertDictElementsAlmostEqual(
                  value, expected_values_dict
              )
          except AssertionError as err:
              raise util.BeamAssertException(err)
  
      self._runTestWithCustomCheck(
          examples,
          eval_export_dir,
          [fairness_metrics],
          custom_metrics_check=check_result,
      )
  
imports: import os
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.addons.fairness.post_export_metrics import fairness_indicators
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.api import tfma_unit
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator_extra_fields
  from tensorflow_model_analysis.eval_saved_model.example_trainers import multi_head
  from tensorflow_model_analysis.evaluators import legacy_metrics_and_plots_evaluator
  from tensorflow_model_analysis.post_export_metrics import post_export_metrics
  import tensorflow_model_analysis.post_export_metrics.metric_keys
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tfx_bsl.tfxio import raw_tf_record
label_desc: Use image node_id 10 for calling the FairnessIndicatorsTest obj's underlying member method code with example usage: obj.testFairnessIndicatorsAtDefaultThresholds() without return types