code: def _runTestWithCustomCheck(
      self,
      examples,
      eval_export_dir,
      metrics_callbacks,
      slice_spec=None,
      custom_metrics_check=None,
      custom_plots_check=None,
      custom_result_check=None,
  ):
      # make sure we are doing some checks
      self.assertTrue(
          custom_metrics_check is not None
          or custom_plots_check is not None
          or custom_result_check is not None
      )
      serialized_examples = [ex.SerializeToString() for ex in examples]
      slicing_specs = None
      if slice_spec:
          slicing_specs = [s.to_proto() for s in slice_spec]
      eval_config = config_pb2.EvalConfig(slicing_specs=slicing_specs)
      eval_shared_model = self.createTestEvalSharedModel(
          eval_saved_model_path=eval_export_dir,
          add_metrics_callbacks=metrics_callbacks,
      )
      extractors = model_eval_lib.default_extractors(
          eval_config=eval_config, eval_shared_model=eval_shared_model
      )
      tfx_io = raw_tf_record.RawBeamRecordTFXIO(
          physical_format="inmemory",
          raw_record_column_name=constants.ARROW_INPUT_COLUMN,
          telemetry_descriptors=["TFMATest"],
      )
      with beam.Pipeline() as pipeline:
          (metrics, plots), _ = (
              pipeline
              | "Create" >> beam.Create(serialized_examples)
              | "BatchExamples" >> tfx_io.BeamSource()
              | "InputsToExtracts"
              >> model_eval_lib.BatchedInputsToExtracts()
              | "Extract"
              >> tfma_unit.Extract(
                  extractors=extractors
              )  # pylint: disable=no-value-for-parameter
              | "ComputeMetricsAndPlots"
              >> legacy_metrics_and_plots_evaluator._ComputeMetricsAndPlots(  # pylint: disable=protected-access
                  eval_shared_model=eval_shared_model,
                  compute_confidence_intervals=self.compute_confidence_intervals,
                  random_seed_for_testing=self.deterministic_test_seed,
              )
          )
          if custom_metrics_check is not None:
              util.assert_that(
                  metrics, custom_metrics_check, label="metrics"
              )
          if custom_plots_check is not None:
              util.assert_that(plots, custom_plots_check, label="plot")
  
      result = pipeline.run()
      if custom_result_check is not None:
          custom_result_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 2 for calling the FairnessIndicatorsTest obj's underlying member method code with example usage: obj._runTestWithCustomCheck(examples, eval_export_dir, metrics_callbacks, slice_spec, custom_metrics_check, custom_plots_check, custom_result_check) without return types