def METHOD_NAME(self):
    with EventStorage() as s:
        p1 = CommonMetricPrinter(10)
        p2 = CommonMetricPrinter()
        s.put_scalar("time", 1.0)
        s.put_scalar("[metric]bn_stat", 1.0)
        s.step()
        s.put_scalar("time", 1.0)
        s.put_scalar("[metric]bn_stat", 1.0)
        s.step()
        with self.assertLogs("detectron2.utils.events") as logs:
            p1.write()
        self.assertIn("[metric]bn_stat", logs.output[0])
        with self.assertLogs("detectron2.utils.events") as logs:
            p2.write()
        self.assertIn("[metric]bn_stat", logs.output[0])