def update_reduced_metric(self, name, value, key=None):
if name not in self.metrics:<EOL><INDENT>Log.error("<STR_LIT>", name)<EOL><DEDENT>if key is None and isinstance(self.metrics[name], ReducedMetric):<EOL><INDENT>self.metrics[name].update(value)<EOL><DEDENT>elif key is not None and isinstance(self.metrics[name], MultiReducedMetric):<EOL><INDENT>self.metrics[name].update(key, value)<EOL><DEDENT>else:<EOL><INDENT>Log.error("<STR_LIT>", name)<EOL><DEDENT>
Update the value of ReducedMetric or MultiReducedMetric

        :type name: str
        :param name: name of the registered metric to be updated.
        :param value: specifies a value to be reduced.
        :type key: str or None
        :param key: specifies a key for MultiReducedMetric. Needs to be `None` for updating
                    ReducedMetric.