def promote(self, level=None):
if level is None:<EOL><INDENT>if len(self.fields) < <NUM_LIT:2>:<EOL><INDENT>if self.level in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT:state>', '<STR_LIT>'):<EOL><INDENT>cls = self.get_class('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>cls = self.get_class(self.fields[-<NUM_LIT:2>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>cls = self.get_class(level)<EOL><DEDENT>d = dict(self.__dict__.items())<EOL>d['<STR_LIT>'] = self.sl<EOL>return cls(**d)<EOL>
Convert to the next higher level summary level