def METHOD_NAME(self, name, value):
    """
    addMetric(name, value)
    Attach a test metric to the test result, with the given name and list of
    values. It is an error to attempt to attach the metrics with the same
    name multiple times.
    Each value must be an instance of a MetricValue subclass.
    """
    if name in self.metrics:
        raise ValueError("result already includes metrics for %r" % (
                name,))
    if not isinstance(value, MetricValue):
        raise TypeError("unexpected metric value: %r" % (value,))
    self.metrics[name] = value