code: def testFilterAndSeparateComputations(self):
      eval_config = config_pb2.EvalConfig(
          model_specs=[
              config_pb2.ModelSpec(name="candidate", label_key="tips"),
              config_pb2.ModelSpec(
                  name="baseline", label_key="tips", is_baseline=True
              ),
          ],
          cross_slicing_specs=[config_pb2.CrossSlicingSpec()],
      )
      metrics_specs = metric_specs.specs_from_metrics(
          [
              tf.keras.metrics.BinaryAccuracy(name="accuracy"),
              tf.keras.metrics.AUC(name="auc", num_thresholds=10000),
              tf.keras.metrics.AUC(
                  name="auc_precison_recall",
                  curve="PR",
                  num_thresholds=10000,
              ),
              tf.keras.metrics.Precision(name="precision"),
              tf.keras.metrics.Recall(name="recall"),
              calibration.MeanLabel(name="mean_label"),
              calibration.MeanPrediction(name="mean_prediction"),
              calibration.Calibration(name="calibration"),
              confusion_matrix_plot.ConfusionMatrixPlot(
                  name="confusion_matrix_plot"
              ),
              calibration_plot.CalibrationPlot(name="calibration_plot"),
              lift.Lift(name="lift"),
          ],
          model_names=["candidate", "baseline"],
          binarize=config_pb2.BinarizationOptions(
              class_ids={"values": [0, 5]}
          ),
      )
      computations = metric_specs.to_computations(
          metrics_specs, eval_config=eval_config
      )
      (
          non_derived,
          derived,
          cross_slice,
          ci_derived,
      ) = metrics_plots_and_validations_evaluator._filter_and_separate_computations(
          computations
      )
      # 2 models x 2 classes x _binary_confusion_matrix_[0.5]_100,
      # 2 models x 2 classes x _CalibrationHistogramCombiner
      # 2 models x 2 classes x _calibration_historgram_27
      # 2 models x 2 classes x _CompilableMetricsCombiner,
      # 2 models x 2 classes x _WeightedLabelsPredictionsExamplesCombiner,
      # 4 models x _ExampleCountCombiner
      self.assertLen(non_derived, 20)
      # 2 models x 2 classes x _binary_confusion_matrices_[0.5],
      # 2 models x 2 classes x _binary_confusion_matrices_10000
      # 2 models x 2 classes x _binary_confusion_matrices_confusion_matrix_plot
      # 2 models x 2 classes x precision
      # 2 models x 2 classes x recall
      # 2 models x 2 classes x calibration
      # 2 models x 2 classes x auc_precision_recall
      # 2 models x 2 classes x mean_prediction
      # 2 models x 2 classes x mean_label
      # 2 models x 2 classes x confusion_matrix_plot
      # 2 models x 2 classes x calibration_plot
      # 2 models x 2 classes x auc
      # 2 models x 2 classes x accuracy
      self.assertLen(derived, 52)
      # 2 models x 2 classes x lift
      self.assertLen(cross_slice, 4)
      # None of the metric has CIDerivedMetricComputation.
      self.assertEmpty(ci_derived)
  
imports: import os
  from absl.testing import parameterized
  import apache_beam
  from apache_beam.testing import util
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.addons.fairness.metrics import lift
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import dnn_classifier
  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 linear_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import multi_head
  from tensorflow_model_analysis.evaluators import metrics_plots_and_validations_evaluator
  from tensorflow_model_analysis.extractors import example_weights_extractor
  from tensorflow_model_analysis.extractors import features_extractor
  from tensorflow_model_analysis.extractors import labels_extractor
  from tensorflow_model_analysis.extractors import legacy_predict_extractor
  from tensorflow_model_analysis.extractors import materialized_predictions_extractor
  from tensorflow_model_analysis.extractors import predictions_extractor
  from tensorflow_model_analysis.extractors import slice_key_extractor
  from tensorflow_model_analysis.extractors import unbatch_extractor
  from tensorflow_model_analysis.metrics import attributions
  from tensorflow_model_analysis.metrics import binary_confusion_matrices
  from tensorflow_model_analysis.metrics import calibration
  from tensorflow_model_analysis.metrics import calibration_plot
  from tensorflow_model_analysis.metrics import confusion_matrix_plot
  from tensorflow_model_analysis.metrics import metric_specs
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import ndcg
  from tensorflow_model_analysis.post_export_metrics import metrics
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import validation_result_pb2
  from tfx_bsl.tfxio import raw_tf_record
  from tfx_bsl.tfxio import tensor_adapter
  from tfx_bsl.tfxio import test_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 4 for calling the MetricsPlotsAndValidationsEvaluatorTest obj's underlying member method code with example usage: obj.testFilterAndSeparateComputations() without return types