code: def testFlipCount_predictionIsEmpty_raiseValueError(self):
      computations = flip_count.FlipCount(
          thresholds=[0.3],
          counterfactual_prediction_key="counterfactual_pred_key",
          example_id_key="example_id_key",
      ).computations()
      binary_confusion_matrix = computations[0]
      matrices = computations[1]
      metrics = computations[2]
      examples = [
          {
              "labels": None,
              "predictions": np.array([]),
              "example_weights": np.array([1.0]),
              "features": {
                  "counterfactual_pred_key": np.array([0.4, 0.5]),
                  "example_id_key": np.array(["id_1"]),
              },
          },
          {
              "labels": None,
              "predictions": np.array([0.2, 0.1]),
              "example_weights": np.array([1.0]),
              "features": {
                  "counterfactual_pred_key": np.array([0.4, 0.5]),
                  "example_id_key": np.array(["id_4"]),
              },
          },
      ]
  
      with self.assertRaises(ValueError):
          with beam.Pipeline() as pipeline:
              # pylint: disable=no-value-for-parameter
              _ = (
                  pipeline
                  | "Create" >> beam.Create(examples)
                  | "Process"
                  >> beam.Map(
                      metric_util.to_standard_metric_inputs, True
                  )
                  | "AddSlice" >> beam.Map(lambda x: ((), x))
                  | "ComputeBinaryConfusionMatrix"
                  >> beam.CombinePerKey(
                      binary_confusion_matrix.combiner
                  )
                  | "ComputeMatrices"
                  >> beam.Map(
                      lambda x: (x[0], matrices.result(x[1]))
                  )  # pyformat: ignore
                  | "FlipCount"
                  >> beam.Map(lambda x: (x[0], metrics.result(x[1])))
              )
  
file_path: model-analysis/tensorflow_model_analysis/addons/fairness/metrics/counterfactual_fairness/flip_count_test.py
imports: import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  from tensorflow_model_analysis.addons.fairness.metrics.counterfactual_fairness import flip_count
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from google.protobuf import text_format
label_desc: Use image node_id 6 for calling the FlipCountTest obj's underlying member method code with example usage: obj.testFlipCount_predictionIsEmpty_raiseValueError() without return types