def METHOD_NAME(
        self,
        **kwargs
    ):
    for key, value in kwargs.items():
        assert hasattr(WriterThread, key)
        setattr(WriterThread, key, value)
    self.writer = writer
    args = runner.get_command_line()
    args = runner.add_command_line_args(args)
    if SHOW_OTHER_DEBUG_INFO:
        print('executing: %s' % (' '.join(args),))
    try:
        with runner.run_process(args, writer) as dct_with_stdout_stder:
            writer.get_stdout = lambda: ''.join(dct_with_stdout_stder['stdout'])
            writer.get_stderr = lambda: ''.join(dct_with_stdout_stder['stderr'])
            # Make sure communication is setup.
            writer.hello()
            yield writer
    finally:
        writer.log = []
    stdout = dct_with_stdout_stder['stdout']
    stderr = dct_with_stdout_stder['stderr']
    writer.additional_output_checks(''.join(stdout), ''.join(stderr))