def assertMetricDiff(self, frozen_registry, expected_diff,<EOL>metric_name, registry=REGISTRY, **labels):
saved_value = self.getMetricFromFrozenRegistry(<EOL>metric_name, frozen_registry, **labels)<EOL>current_value = self.getMetric(metric_name, registry=registry,<EOL>**labels)<EOL>self.assertFalse(<EOL>current_value is None,<EOL>METRIC_DIFF_ERR_NONE_EXPLANATION % (<EOL>metric_name, self.formatLabels(labels),<EOL>saved_value,<EOL>current_value))<EOL>diff = current_value - (saved_value or <NUM_LIT:0.0>)<EOL>self.assertEqual(<EOL>expected_diff, diff,<EOL>METRIC_DIFF_ERR_EXPLANATION % (<EOL>metric_name, self.formatLabels(labels), diff, expected_diff,<EOL>saved_value,<EOL>current_value))<EOL>
Asserts that metric_name{**labels} changed by expected_diff between
        the frozen registry and now. A frozen registry can be obtained
        by calling saveRegistry, typically at the beginning of a test
        case.