docs: public static void setModel(IRubyObject p, IRubyObject input, IRubyObject model) {
          Ruby runtime = p.getRuntime();
          Parser parser = (Parser)p.dataGetStructChecked();
          parser.handler(new RubyLoadHandler(runtime, ((YAMLExtra)runtime.getModule("YAML").dataGetStruct())));
          if(model == runtime.newSymbol("Generic")) {
              p.callMethod(runtime.getCurrentContext(), "set_resolver", ((RubyModule)((RubyModule)runtime.getModule("YAML")).getConstant("Yecht")).getConstant("GenericResolver"));
          }
          parser.implicitTyping(true);
          parser.taguriExpansion(true);
  
          if(input.isNil()) {
              input = (IRubyObject)((RubyObject)p).fastGetInstanceVariable("@input");
          }
  
          if(input == runtime.newSymbol("bytecode")) {
              parser.setInputType(ParserInput.Bytecode_UTF8);
          } else {
              parser.setInputType(ParserInput.YAML_UTF8);
          }
  
          parser.errorHandler(new RubyErrHandler(runtime));
          parser.badAnchorHandler(new RubyBadAnchorHandler(runtime));
      }