<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _metric_to_riemann_event(self, metric):
 """ Convert a metric to a dictionary representing a Riemann event. """

        # Riemann has a separate "host" field, so remove from the path.
        path = '%s.%s.%s' % (
            metric.getPathPrefix(),
            metric.getCollectorPath(),
            metric.getMetricPath()
        )

        return self.client.create_event({
            'host': metric.host,
            'service': path,
            'time': metric.timestamp,
            'metric_f': float(metric.value),
            'ttl': metric.ttl,
        })