human
Complete the below
def capture_journal(reactor, host, output_file):

    ''''SSH into given machine and capture relevant logs, writing them to
    output file.
    :param reactor: The reactor.
    :param bytes host: Machine to SSH into.
    :param file output_file: File to write to.
    :return deferred: that will run the journalctl command'
    '''

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def get_journald_output():
        formatter = journald_json_formatter(output_file)
        ran = run_ssh(reactor=reactor, host=host, username='root', command=['journalctl', '--lines', '0', '--output', 'export', '--follow', '-u', 'docker', '-u', 'flocker-control', '-u', 'flocker-dataset-agent', '-u', 'flocker-container-agent', '-u', 'flocker-docker-plugin'], handle_stdout=formatter)
        ran.addErrback(write_failure, logger=None)
        ran.addCallback((lambda ignored: formatter('')))
        return ran
    return loop_until(reactor, get_journald_output, repeat(2.0))