def formatUIDListResponse(msgs, getUidl):
    """
    Format a list of message sizes into a complete UIDL response.

    This generator function is intended to be used with
    L{Cooperator <twisted.internet.task.Cooperator>}.

    @type msgs: L{list} of L{int}
    @param msgs: A list of message sizes.

    @type getUidl: one-argument callable returning bytes
    @param getUidl: A callable which takes a message index number and returns
        the UID of the corresponding message in the mailbox.

    @rtype: L{bytes}
    @return: Yields a series of strings which make up a complete UIDL response.
    """
    yield successResponse('')
    for ele in formatUIDListLines(msgs, getUidl):
        yield ele
    yield b'.\r\n'

    Format a list of message sizes into a complete UIDL response.

    This generator function is intended to be used with
    L{Cooperator <twisted.internet.task.Cooperator>}.

    @type msgs: L{list} of L{int}
    @param msgs: A list of message sizes.

    @type getUidl: one-argument callable returning bytes
    @param getUidl: A callable which takes a message index number and returns
        the UID of the corresponding message in the mailbox.

    @rtype: L{bytes}
    @return: Yields a series of strings which make up a complete UIDL response.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/pop3.py