'Writes the reference and decoded outputs to RKV files.
Args:
reference: The human (correct) result.
decode: The machine-generated result'

def Write(self, reference, decode):

    self._ref_file.write(('output=%s\n' % reference))
    self._decode_file.write(('output=%s\n' % decode))
    self._cnt += 1
    if ((self._cnt % DECODE_IO_FLUSH_INTERVAL) == 0):
        self._ref_file.flush()
        self._decode_file.flush()
