def convert_compound_entry(self, compound):
d = OrderedDict()<EOL>d['<STR_LIT:id>'] = compound.id<EOL>order = {<EOL>key: i for i, key in enumerate(<EOL>['<STR_LIT:name>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'])}<EOL>prop_keys = (<EOL>set(compound.properties) - {'<STR_LIT>', '<STR_LIT>'})<EOL>for prop in sorted(prop_keys,<EOL>key=lambda x: (order.get(x, <NUM_LIT:1000>), x)):<EOL><INDENT>if compound.properties[prop] is not None:<EOL><INDENT>d[prop] = compound.properties[prop]<EOL><DEDENT><DEDENT>return d<EOL>
Convert compound entry to YAML dict.