<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _callback(self, data):
 """Processor callback to clean-up stream data. This function provides a hook into the output stream of data from the controller processing thread. Hottop readings are saved into a local class variable for later saving. If the user has defined a callback, it will be called within this private function. :param data: Information from the controller process :type data: dict :returns: None """

        local = copy.deepcopy(data)
        output = dict()
        output['config'] = local
        if self._roast_start:
            td = (now_time() - load_time(self._roast_start))
            # Seconds since starting
            output['time'] = ((td.total_seconds() + 60) / 60) - 1
            self._roast['duration'] = output['time']
            local.update({'time': output['time']})
            output['datetime'] = now_time(str=True)
            ct = load_time(now_time(str=True))
            st = load_time(self._roast['start_time'])
            self._roast['duration'] = timedelta2period(ct - st)

        if self._roast['record']:
            copied = copy.deepcopy(output)
            self._derive_charge(copied['config'])
            self._derive_turning_point(copied['config'])
            self._roast['events'].append(copied)

            if self._roast['last']:
                delta = local['bean_temp'] - self._roast['last']['bean_temp']
                output['config']['delta_bean_temp'] = delta
            self._roast['last'] = local

        if self._user_callback:
            self._log.debug("Passing data back to client handler")
            output['roast'] = self._roast
            output['roasting'] = self._roasting
            if local.get('valid', True):
                self._user_callback(output)