code: def accumulate_metric(cls, name, value):
          
          metrics_cache = cls._get_metrics_cache()
          metrics_cache.setdefault(name, 0)
          metrics_cache.set(name, value)
docs: Accumulate a custom metric (name and value) in the metrics cache.