<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _gen_delta_per_sec(self, path, value_delta, time_delta, multiplier, prettyname, device):
 """ Calulates the difference between to point, and scales is to per second. """

        if time_delta < 0:
            return
        value = (value_delta / time_delta) * multiplier
        # Only publish if there is any data.
        # This helps keep unused metrics out of Graphite
        if value > 0.0:
            self._replace_and_publish(path, prettyname, value, device)