docstr: This test verifies that a single update on the meter is successful,
  resets the meter, then applies the update again.
docstr_tok: ["This","test","verifies","that","a","single","update","on","the","meter","is","successful",",","resets","the","meter",",","then","applies","the","update","again","."]
code: def meter_update_and_reset_test(
      self, meter, model_outputs, targets, expected_value, **kwargs
  ):
      """
      This test verifies that a single update on the meter is successful,
      resets the meter, then applies the update again.
      """
      # If a single output is provided, wrap in list
      if not isinstance(model_outputs, list):
          model_outputs = [model_outputs]
          targets = [targets]
  
      self._validate_meter_inputs(meter, model_outputs, targets)
  
      self._apply_updates_and_test_meter(
          meter, model_outputs, targets, expected_value, **kwargs
      )
  
      meter.reset()
  
      # Verify reset works by reusing single update test
      self._apply_updates_and_test_meter(
          meter, model_outputs, targets, expected_value, **kwargs
      )
  
file_path: vissl/tests/meter_test_utils.py
imports: import unittest
  import torch
label_desc: Use image node_id 3 for calling the ClassificationMeterTest obj's underlying member method code with example usage: obj.meter_update_and_reset_test(meter, model_outputs, targets, expected_value) without return types