docstr: Helper to create a set of examples used by multiple tests.
docstr_tok: ["Helper","to","create","a","set","of","examples","used","by","multiple","tests","."]
code: def makeConfusionMatrixExamples(self):
      """Helper to create a set of examples used by multiple tests."""
      #            |      |       --------- Threshold -----------
      # true label | pred | wt   | -1e-6 | 0.0 | 0.7 | 0.8 | 1.0
      #     -      | 0.0  | 1.0  | FP    | TN  | TN  | TN  | TN
      #     +      | 0.0  | 1.0  | TP    | FN  | FN  | FN  | FN
      #     +      | 0.7  | 3.0  | TP    | TP  | FN  | FN  | FN
      #     -      | 0.8  | 2.0  | FP    | FP  | FP  | TN  | TN
      #     +      | 1.0  | 3.0  | TP    | TP  | TP  | TP  | FN
      return [
          self._makeExample(
              prediction=0.0000,
              label=0.0000,
              fixed_float=1.0,
              fixed_string="",
              fixed_int=0,
          ),
          self._makeExample(
              prediction=0.0000,
              label=1.0000,
              fixed_float=1.0,
              fixed_string="",
              fixed_int=0,
          ),
          self._makeExample(
              prediction=0.7000,
              label=1.0000,
              fixed_float=3.0,
              fixed_string="",
              fixed_int=0,
          ),
          self._makeExample(
              prediction=0.8000,
              label=0.0000,
              fixed_float=2.0,
              fixed_string="",
              fixed_int=0,
          ),
          self._makeExample(
              prediction=1.0000,
              label=1.0000,
              fixed_float=3.0,
              fixed_string="",
              fixed_int=0,
          ),
      ]
  
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 4 for calling the FairnessIndicatorsTest obj's underlying member method code with example usage: obj.makeConfusionMatrixExamples() and returns: list