<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_or_sum_metric(self, metrics, metric_path, value):
 """If we already have a datapoint for this metric, lets add the value. This is used when the logstash mode is enabled."""

        if metric_path in metrics:
            metrics[metric_path] += value
        else:
            metrics[metric_path] = value