code: def uniformat(value):
      
  
      if value in GROUP_ESCAPES:
          # Escape characters that are (or will be in the future) problematic
          c = "\\x%02x\\x%02x" % (0x5c, value)
      elif value <= 0xFF:
          c = "\\x%02x" % value
      elif value <= 0xFFFF:
          c = "\\u%04x" % value
      else:
          c = "\\U%08x" % value
      return c
docs: Convert a Unicode char.