docs: public static AviatorFunction generateGFunction(String name, RoleManager rm) {
          return new AbstractFunction() {
              public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2) {
                  String name1 = FunctionUtils.getStringValue(arg1, env);
                  String name2 = FunctionUtils.getStringValue(arg2, env);
  
                  if (rm == null) {
                      return AviatorBoolean.valueOf(name1.equals(name2));
                  } else {
                      boolean res = rm.hasLink(name1, name2);
                      return AviatorBoolean.valueOf(res);
                  }
              }
  
              public AviatorObject call(Map<String, Object> env, AviatorObject arg1, AviatorObject arg2, AviatorObject arg3) {
                  String name1 = FunctionUtils.getStringValue(arg1, env);
                  String name2 = FunctionUtils.getStringValue(arg2, env);
  
                  if (rm == null) {
                      return AviatorBoolean.valueOf(name1.equals(name2));
                  } else {
                      String domain = FunctionUtils.getStringValue(arg3, env);
                      boolean res = rm.hasLink(name1, name2, domain);
                      return AviatorBoolean.valueOf(res);
                  }
              }
  
              public String getName() {
                  return name;
              }
          };
      }