def write_pickle(self, path, compress=False):
logger.info('<STR_LIT>', path)<EOL>if compress:<EOL><INDENT>with gzip.open(path, '<STR_LIT:wb>') as ofh:<EOL><INDENT>pickle.dump(self, ofh, pickle.HIGHEST_PROTOCOL)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>with open(path, '<STR_LIT:wb>') as ofh:<EOL><INDENT>pickle.dump(self, ofh, pickle.HIGHEST_PROTOCOL)<EOL><DEDENT><DEDENT>
Serialize the current `GOParser` object and store it in a pickle file.

        Parameters
        ----------
        path: str
            Path of the output file.
        compress: bool, optional
            Whether to compress the file using gzip.

        Returns
        -------
        None

        Notes
        -----
        Compression with gzip is significantly slower than storing the file
        in uncompressed form.