def generate(self):
tar_bytes = BytesIO()<EOL>tar = tarfile.open(fileobj=tar_bytes, mode='<STR_LIT:w>')<EOL>self._generate_contents(tar)<EOL>self._process_files(tar)<EOL>tar.close()<EOL>tar_bytes.seek(<NUM_LIT:0>)  <EOL>gzip_bytes = BytesIO()<EOL>gz = gzip.GzipFile(fileobj=gzip_bytes, mode='<STR_LIT:wb>', mtime=<NUM_LIT:0>)<EOL>gz.write(tar_bytes.getvalue())<EOL>gz.close()<EOL>gzip_bytes.seek(<NUM_LIT:0>)  <EOL>return gzip_bytes<EOL>
Returns a ``BytesIO`` instance representing an in-memory tar.gz archive
containing the native router configuration.

:returns: in-memory tar.gz archive, instance of ``BytesIO``