def set_last_position(self, last_position):
        """
        Called from the manager, it is in charge of updating the last position of data commited
        by the writer, in order to have resume support
        """
        if last_position is None:
            self.last_position = {}
            for partition in self.partitions:
                self.last_position[partition] = 0
            self.consumer.offsets = self.last_position.copy()
            self.consumer.fetch_offsets = self.consumer.offsets.copy()
        else:
            self.last_position = last_position
            self.consumer.offsets = last_position.copy()
            self.consumer.fetch_offsets = self.consumer.offsets.copy()
Called from the manager, it is in charge of updating the last position of data commited
        by the writer, in order to have resume support