code: def html_entity_decode_codepoint(self, m,
                                       defs=htmlentities.codepoint2name):
          
          try:
              char = defs[m.group(1)]
              return "&{char};".format(char=char)
          except ValueError:
              return m.group(0)
          except KeyError:
              return m.group(0)
docs: decode html entity into one of the codepoint2name