<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def next_task(self, item, **kwargs):
 """Calls import_batch for the next filename in the queue and "archives" the file. The archive folder is typically the folder for the deserializer queue. """

        filename = os.path.basename(item)
        try:
            self.tx_importer.import_batch(filename=filename)
        except TransactionImporterError as e:
            raise TransactionsFileQueueError(e) from e
        else:
            self.archive(filename)