<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _completed_cb(self, data):
 """ Extract info from data and emit completed. """

        try:
            info = json.loads(data)
        except ValueError:
            info = self._hook_data(data)
        except Exception, e:
            info = None
            logging.error('%s: _completed_cb crashed with %s',
                          self.__class__.__name__, str(e))
        finally:
            self._hook_id(info)
            self.emit('completed', info)