def successResponse(response):
    """
    Format an object as a positive response.

    @type response: stringifyable L{object}
    @param response: An object with a string representation.

    @rtype: L{bytes}
    @return: A positive POP3 response string.
    """
    if not isinstance(response, bytes):
        response = str(response).encode("utf-8")
    return b'+OK ' + response + b'\r\n'

    Format an object as a positive response.

    @type response: stringifyable L{object}
    @param response: An object with a string representation.

    @rtype: L{bytes}
    @return: A positive POP3 response string.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/pop3.py