async def METHOD_NAME(corp: KCorpus, args: WordlistFormArgs, max_items: int) -> List[Tuple[str, int]]:
    """
    Note: 'pfilter_words' and 'nfilter_words' are expected to contain utf-8-encoded strings.
    """
    attr = corp.get_attr(args.wlattr)
    attrfreq = await _get_attrfreq(corp=corp, attr=attr, wlattr=args.wlattr, wlnums=args.wlnums)
    if args.pfilter_words and args.wlpat in ('.*', '.+', ''):  # word list just for given words
        items = _wordlist_from_list(attr=attr, attrfreq=attrfreq, pfilter_words=args.pfilter_words,
                                    nfilter_words=args.nfilter_words, wlminfreq=args.wlminfreq,
                                    wlnums=args.wlnums)
    else:  # word list according to pattern
        if not args.include_nonwords:
            nwre = corp.get_conf('NONWORDRE')
        else:
            nwre = ''
        items = _wordlist_by_pattern(attr=attr, enc_pattern=args.wlpat.strip(), excl_pattern=nwre,
                                     wlminfreq=args.wlminfreq, pfilter_words=args.pfilter_words,
                                     nfilter_words=args.nfilter_words, wlnums=args.wlnums,
                                     attrfreq=attrfreq)
    return items[:max_items]