def _to_ufo_kerning(self, ufo, kerning_data):
warning_msg = "<STR_LIT>"<EOL>for left, pairs in kerning_data.items():<EOL><INDENT>match = re.match(r"<STR_LIT>", left)<EOL>left_is_class = bool(match)<EOL>if left_is_class:<EOL><INDENT>left = "<STR_LIT>" % match.group(<NUM_LIT:1>)<EOL>if left not in ufo.groups:<EOL><INDENT>self.logger.warning(warning_msg % left)<EOL><DEDENT><DEDENT>for right, kerning_val in pairs.items():<EOL><INDENT>match = re.match(r"<STR_LIT>", right)<EOL>right_is_class = bool(match)<EOL>if right_is_class:<EOL><INDENT>right = "<STR_LIT>" % match.group(<NUM_LIT:1>)<EOL>if right not in ufo.groups:<EOL><INDENT>self.logger.warning(warning_msg % right)<EOL><DEDENT><DEDENT>ufo.kerning[left, right] = kerning_val<EOL><DEDENT><DEDENT>
Add .glyphs kerning to an UFO.