private Object @NotNull [] transformArgs(@NotNull RemoteCall call) {
    Object[] args = new Object[call.getArgs().length];
    for (int i = 0; i < args.length; i++) {
      var arg = call.getArgs()[i];

      if (arg instanceof Ref) {
        Object reference = getReference(call.getSessionId(), ((Ref)arg).id());
        args[i] = reference;
      }
      else {
        args[i] = arg;
      }
    }

    return args;
  }
private Object @NotNull [] transformArgs(@NotNull RemoteCall call)