docs: @JRubyMethod
      public static IRubyObject node_import(IRubyObject self, IRubyObject node) {
          //             System.err.println("syck_resolver_node_import()");
          final Ruby runtime = self.getRuntime();
          final ThreadContext ctx = runtime.getCurrentContext();
          org.yecht.Node n = (org.yecht.Node)node.dataGetStructChecked();
          YAMLExtra x = ((Node)node).x;
          IRubyObject obj = null;
          switch(n.kind) {
          case Str:
              Data.Str dd = (Data.Str)n.data;
              obj = RubyString.newStringShared(runtime, dd.ptr.buffer, dd.ptr.start, dd.len);
              break;
          case Seq:
              Data.Seq ds = (Data.Seq)n.data;
              obj = RubyArray.newArray(runtime, ds.idx);
              for(int i = 0; i < ds.idx; i++) {
                  IRubyObject obj2 = (IRubyObject)n.seqRead(i);
                  ((RubyArray)obj).store(i, obj2);
              }
              break;
          case Map:
              Data.Map dm = (Data.Map)n.data;
              obj = RubyHash.newHash(runtime);
              RubyClass cMergeKey = x.MergeKey;
              RubyClass cDefaultKey = x.DefaultKey;
              RubyClass cHash = runtime.getHash();
              RubyClass cArray = runtime.getArray();
                  
              for(int i = 0; i < dm.idx; i++) {
                  IRubyObject k = (IRubyObject)n.mapRead(MapPart.Key, i);
                  IRubyObject v = (IRubyObject)n.mapRead(MapPart.Value, i);
                  if(null == v) {
                      v = runtime.getNil();
                  }
                  boolean skip_aset = false;
                      
                  if(cMergeKey.isInstance(k)) {
                      if(cHash.isInstance(v)) {
                          IRubyObject dup = v.callMethod(ctx, "dup");
                          dup.callMethod(ctx, "update", obj);
                          obj = dup;
                          skip_aset = true;
                      } else if(cArray.isInstance(v)) {
                          IRubyObject end = ((RubyArray)v).pop(ctx);
                          if(cHash.isInstance(end)) {
                              final IRubyObject dup = end.callMethod(ctx, "dup");
                              v = ((RubyArray)v).reverse();
                              ((RubyArray)v).append(obj);
  
                              RubyEnumerable.callEach(runtime, ctx, v, new BlockCallback() {
                                      // syck_merge_i
                                      public IRubyObject call(ThreadContext _ctx, IRubyObject[] largs, Block blk) {
                                          IRubyObject entry = largs[0];
                                          IRubyObject tmp = null;
                                          if(!(tmp = TypeConverter.convertToTypeWithCheck(entry, runtime.getHash(), "to_hash")).isNil()) {
                                              dup.callMethod(_ctx, "update", tmp);
                                          }
                                          return runtime.getNil();
                                      }
                                  });
  
                              obj = dup;
                              skip_aset = true;
                          }
                      }
                  } else if(cDefaultKey.isInstance(k)) {
                      obj.callMethod(ctx, "default=", v);
                      skip_aset = true;
                  }
                      
                  if(!skip_aset) {
                      ((RubyHash)obj).fastASet(k, v);
                  }
              }
              break;
          }
              
          if(n.type_id != null) {
              obj = self.callMethod(ctx, "transfer", new IRubyObject[]{runtime.newString(n.type_id), obj});
          }
  
          return obj;
      }