def prepare(self):
        """Un-serialize data from data attribute and add instance_id key if necessary

        :return: None
        """
        # Maybe the Brok is a old daemon one or was already prepared
        # if so, the data is already ok
        if hasattr(self, 'prepared') and not self.prepared:
            self.data = unserialize(self.data)
            if self.instance_id:
                self.data['instance_id'] = self.instance_id
        self.prepared = True
def prepare ( self ) : if hasattr ( self , 'prepared' ) and not self . prepared : self . data = unserialize ( self . data ) if self . instance_id : self . data [ 'instance_id' ] = self . instance_id self . prepared = True
Un-serialize data from data attribute and add instance_id key if necessary

        :return: None