code: def normalizeKerningKey(value):
      
      if not isinstance(value, (tuple, list)):
          raise TypeError("Kerning key must be a tuple instance, not %s."
                          % type(value).__name__)
      if len(value) != 2:
          raise ValueError("Kerning key must be a tuple containing two items, "
                           "not %d." % len(value))
      for v in value:
          if not isinstance(v, basestring):
              raise TypeError("Kerning key items must be strings, not %s."
                              % type(v).__name__)
          if len(v) < 1:
              raise ValueError("Kerning key items must be one character long")
      if value[0].startswith("public.") and not value[0].startswith(
              "public.kern1."):
          raise ValueError("Left Kerning key group must start with "
                           "public.kern1.")
      if value[1].startswith("public.") and not value[1].startswith(
              "public.kern2."):
          raise ValueError("Right Kerning key group must start with "
                           "public.kern2.")
      return tuple([unicode(v) for v in value])
docs: Normalizes kerning key.
  
      * **value** must be a ``tuple`` or ``list``.
      * **value** must contain only two members.
      * **value** items must be :ref:`type-string`.
      * **value** items must be at least one character long.
      * Returned value will be a two member ``tuple`` of unencoded
        ``unicode`` strings.