def __getstate__(self):
odict = self.__dict__.copy()<EOL>odict['<STR_LIT>'] = []<EOL>return odict<EOL>
Get state for serialization.

        Ensures that the context stack is cleared prior to serialization,
        since partial functions cannot be pickled reliably.