docs: def _pretty_const_type_val(typecode, val):
      """
      given a typecode and a value, returns the appropriate pretty
      version of that value (not the dereferenced data)
      """
  
      if typecode == CONST_Utf8:
          typestr = "Utf8"  # formerly Asciz, which was considered Java bug
          if not isinstance(val, str):  # Py2, val is 'unicode'
              val = repr(val)[2:-1]  # trim off the surrounding u"" (HACK)
          else:
              val = repr(val)[1:-1]  # trim off the surrounding "" (HACK)
      elif typecode == CONST_Integer:
          typestr = "int"
      elif typecode == CONST_Float:
          typestr = "float"
          val = "%ff" % val
      elif typecode == CONST_Long:
          typestr = "long"
          val = "%il" % val
      elif typecode == CONST_Double:
          typestr = "double"
          val = "%fd" % val
      elif typecode == CONST_Class:
          typestr = "class"
          val = "#%i" % val
      elif typecode == CONST_String:
          typestr = "String"
          val = "#%i" % val
      elif typecode == CONST_Fieldref:
          typestr = "Field"
          val = "#%i.#%i" % val
      elif typecode == CONST_Methodref:
          typestr = "Method"
          val = "#%i.#%i" % val
      elif typecode == CONST_InterfaceMethodref:
          typestr = "InterfaceMethod"
          val = "#%i.#%i" % val
      elif typecode == CONST_NameAndType:
          typestr = "NameAndType"
          val = "#%i:#%i" % val
      elif typecode == CONST_ModuleId:
          typestr = "ModuleId"
          val = "#%i@#%i" % val
      elif typecode == CONST_MethodHandle:
          typestr = "MethodHandle"
          val = repr(val)
      elif typecode == CONST_MethodType:
          typestr = "MethodType"
          val = repr(val)
      elif typecode == CONST_InvokeDynamic:
          typestr = "InvokeDynamic"
          val = repr(val)
      else:
          raise Unimplemented("unknown constant type %r" % typecode)
  
      return typestr, val