<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def name2unicode(name):
 """Fix pdfminer's name2unicode function Font cids that are mapped to names of the form /g123 seem to be, by convention characters with no corresponding Unicode entry. These can be subsetted fonts or symbolic fonts. There seems to be no way to map /g123 fonts to Unicode, barring a ToUnicode data structure. """

    if name in glyphname2unicode:
        return glyphname2unicode[name]
    if name.startswith('g') or name.startswith('a'):
        raise KeyError(name)
    if name.startswith('uni'):
        try:
            return chr(int(name[3:], 16))
        except ValueError:  # Not hexadecimal
            raise KeyError(name)
    m = STRIP_NAME.search(name)
    if not m:
        raise KeyError(name)
    return chr(int(m.group(0)))