code: def makeUnicodeToGlyphNameMapping(font, glyphOrder=None):
      
      if glyphOrder is None:
          glyphOrder = makeOfficialGlyphOrder(font)
      mapping = {}
      for glyphName in glyphOrder:
          glyph = font[glyphName]
          unicodes = glyph.unicodes
          for uni in unicodes:
              if uni not in mapping:
                  mapping[uni] = glyphName
              else:
                  from ufo2ft.errors import InvalidFontData
  
                  InvalidFontData(
                      "cannot map '%s' to U+%04X; already mapped to '%s'"
                      % (glyphName, uni, mapping[uni])
                  )
      return mapping
docs: Make a unicode: glyph name mapping for this glyph set (dict or Font).
  
      Raises InvalidFontData exception if multiple glyphs are mapped to the
      same unicode codepoint.