def run_module(module, serialize_queue, batch):
    """
    Helper function which simply runs a PeTaL module on data from batch and puts the result in serialize_queue.

    :param module: An instantiated PeTaL module, i.e. `WikipediaArticleModule()`
    :param serialize_queue: The stream of data to be written to disk, and later processed
    :param batch: The data on which this module depends
    """
    module.log.log('Initiated ', module.name, ' run_module() in scheduler')
    if batch is None:
        module.log.log('Backbone run ', module.name)
        gen = module.process()
    else:
        module.log.log('Batched returning run with ', module.name)
        gen = module.process_batch(batch)
    if gen is not None:
        for transaction in gen:
            module.log.log(transaction)
            serialize_queue.put(transaction)
    module.log.log('Finished queueing transactions from ', module.name)
