docs: function collection() {
    var args = mlutil.asArray.apply(null, arguments);
    var argLen = args.length;
  
    if (argLen === 0) {
      return new CollectionConstraintDef(null, null, null);
    }
  
    var constraintName = null;
    var suggestOptions = null;
    var prefix = null;
    var arg = null;
    var i = 0;
    for (; i < argLen; i++) {
      arg = args[i];
      if (constraintName === null && arg instanceof BindDef) {
        constraintName = arg.constraintName;
        continue;
      }
      if (suggestOptions === null && arg instanceof SuggestOptionsDef) {
        suggestOptions = arg['suggest-option'];
        continue;
      }
      if (argLen < 4 && prefix === null && (typeof arg === 'string' || arg instanceof String)) {
        prefix = arg;
        continue;
      }
      break;
    }
  
    if (constraintName != null) {
      if (i < argLen) {
        throw new Error('collection has both query and binding: '+mlutil.identify(args, true));
      }
  
      return new CollectionConstraintDef(
          constraintName, suggestOptions, new CollectionQualifierDef(prefix)
          );
    }
  
    if (suggestOptions != null) {
      throw new Error('collection has both query and suggest options: '+mlutil.identify(args, true));
    }
  
    return new CollectionQueryDef(
        new UrisDef(args, null)
        );
  }