<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_log_file_data_as_encoded_content():
 """Gzip and base64 encode files and BytesIO buffers. This method gets the log files created by SUM based firmware update and tar zip the files. :returns: A gzipped and base64 encoded string as text. """

    with io.BytesIO() as fp:
        with tarfile.open(fileobj=fp, mode='w:gz') as tar:
            for f in OUTPUT_FILES:
                if os.path.isfile(f):
                    tar.add(f)

        fp.seek(0)
        return base64.encode_as_bytes(fp.getvalue())