code: def test_example_model(self):
      train_tf_file = self._write_tf_records(self._create_data())
      classifier = example_model.train_model(
          self._model_dir,
          train_tf_file,
          LABEL,
          TEXT_FEATURE,
          FEATURE_MAP,
      )
  
      validate_tf_file = self._write_tf_records(self._create_data())
      tfma_eval_result_path = os.path.join(
          self._model_dir, "tfma_eval_result"
      )
      example_model.evaluate_model(
          classifier,
          validate_tf_file,
          tfma_eval_result_path,
          SLICE,
          LABEL,
          FEATURE_MAP,
      )
  
      expected_slice_keys = [
          "Overall",
          "slice:slice3",
          "slice:slice1",
          "slice:slice2",
      ]
      evaluation_results = tfma.load_eval_result(tfma_eval_result_path)
  
      self.assertLen(evaluation_results.slicing_metrics, 4)
  
      # Verify if false_positive_rate metrics are computed for all values of
      # slice.
      for slice_key, metric_value in evaluation_results.slicing_metrics:
          slice_key = slicer.stringify_slice_key(slice_key)
          self.assertIn(slice_key, expected_slice_keys)
          self.assertGreaterEqual(
              1.0,
              metric_value[""][""][
                  "post_export_metrics/false_positive_rate@0.50"
              ]["doubleValue"],
          )
          self.assertLessEqual(
              0.0,
              metric_value[""][""][
                  "post_export_metrics/false_positive_rate@0.50"
              ]["doubleValue"],
          )
  
file_path: fairness-indicators/fairness_indicators/example_model_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import datetime
  import os
  import tempfile
  from fairness_indicators import example_model
  import six
  import tensorflow.compat.v1
  import tensorflow_model_analysis
  from tensorflow_model_analysis.slicer import slicer_lib
label_desc: Use image node_id 5 for calling the ExampleModelTest obj's underlying member method code with example usage: obj.test_example_model() without return types