code: def testResetMetricVariables(self):
      temp_eval_export_dir = self._getEvalExportDir()
      _, eval_export_dir = multi_head.simple_multi_head(
          None, temp_eval_export_dir
      )
  
      eval_saved_model = load.EvalSavedModel(eval_export_dir)
      (
          _,
          prediction_dict,
          _,
      ) = eval_saved_model.get_features_predictions_labels_dicts()
      with eval_saved_model.graph_as_default():
          metric_ops = {}
          value_op, update_op = metrics.total(
              tf.shape(input=prediction_dict["english_head/logits"])[0]
          )
          metric_ops["example_count/english_head"] = (
              value_op,
              update_op,
          )
  
          eval_saved_model.register_additional_metric_ops(metric_ops)
  
      example1 = self._makeMultiHeadExample(
          "english"
      ).SerializeToString()
      eval_saved_model.metrics_reset_update_get(example1)
      metric_values = eval_saved_model.get_metric_values()
      self.assertDictElementsAlmostEqual(
          metric_values,
          {
              "label/mean/english_head": 1.0,
              "label/mean/chinese_head": 0.0,
              "label/mean/other_head": 0.0,
              "example_count/english_head": 1.0,
          },
      )
      eval_saved_model.reset_metric_variables()
  
      example2 = self._makeMultiHeadExample(
          "chinese"
      ).SerializeToString()
      eval_saved_model.metrics_reset_update_get(example2)
      metric_values = eval_saved_model.get_metric_values()
      self.assertDictElementsAlmostEqual(
          metric_values,
          {
              "label/mean/english_head": 0.0,
              "label/mean/chinese_head": 1.0,
              "label/mean/other_head": 0.0,
              "example_count/english_head": 1.0,
          },
      )
  
imports: import os
  import numpy
  import tensorflow
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.eval_saved_model import load
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import control_dependency_estimator
  from tensorflow_model_analysis.eval_saved_model.example_trainers import csv_linear_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import custom_estimator
  from tensorflow_model_analysis.eval_saved_model.example_trainers import dnn_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fake_multi_examples_per_input_estimator
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fake_sequence_to_prediction
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator_no_labels
  from tensorflow_model_analysis.eval_saved_model.example_trainers import linear_classifier
  from tensorflow_model_analysis.eval_saved_model.example_trainers import linear_classifier_multivalent
  from tensorflow_model_analysis.eval_saved_model.example_trainers import multi_head
  from tensorflow_model_analysis.post_export_metrics import metrics
  from tensorflow.core.example import example_pb2
label_desc: Use image node_id 23 for calling the IntegrationTest obj's underlying member method code with example usage: obj.testResetMetricVariables() without return types