code: def calculate(self, batch_info):
          
          value = self._value_function(batch_info['data'], batch_info['target'], batch_info['output'])
          self.storage.append(value)
docs: Calculate value of a metric