def getKerningMutator(self, pairs=None):
if self._kerningMutator and pairs == self._kerningMutatorPairs:<EOL><INDENT>return self._kerningMutator<EOL><DEDENT>kerningItems = []<EOL>if pairs is None:<EOL><INDENT>for sourceDescriptor in self.sources:<EOL><INDENT>if sourceDescriptor.layerName is not None:<EOL><INDENT>continue<EOL><DEDENT>if not sourceDescriptor.muteKerning:<EOL><INDENT>loc = Location(sourceDescriptor.location)<EOL>sourceFont = self.fonts[sourceDescriptor.name]<EOL>if sourceFont is None: continue<EOL>kerningItems.append((loc, self.mathKerningClass(sourceFont.kerning, sourceFont.groups)))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>self._kerningMutatorPairs = pairs<EOL>for sourceDescriptor in self.sources:<EOL><INDENT>if sourceDescriptor.layerName is not None:<EOL><INDENT>continue<EOL><DEDENT>if not os.path.exists(sourceDescriptor.path):<EOL><INDENT>continue<EOL><DEDENT>if not sourceDescriptor.muteKerning:<EOL><INDENT>sourceFont = self.fonts[sourceDescriptor.name]<EOL>if sourceFont is None:<EOL><INDENT>continue<EOL><DEDENT>loc = Location(sourceDescriptor.location)<EOL>kerningItem = self.mathKerningClass(sourceFont.kerning, sourceFont.groups)<EOL>sparseKerning = {}<EOL>for pair in pairs:<EOL><INDENT>v = kerningItem.get(pair)<EOL>if v is not None:<EOL><INDENT>sparseKerning[pair] = v<EOL><DEDENT><DEDENT>kerningItems.append((loc, self.mathKerningClass(sparseKerning)))<EOL><DEDENT><DEDENT><DEDENT>bias, self._kerningMutator = self.getVariationModel(kerningItems, axes=self.serializedAxes, bias=self.newDefaultLocation())<EOL>return self._kerningMutator<EOL>
Return a kerning mutator, collect the sources, build mathGlyphs.
            If no pairs are given: calculate the whole table.
            If pairs are given then query the sources for a value and make a mutator only with those values.