def METHOD_NAME(s, output=output, lineEnd=b'\n'):
    # RFC 1521 requires that the line ending in a space or tab must have
    # that trailing character encoded.
    if s and s[-1:] in b' \t':
        output.METHOD_NAME(s[:-1] + quote(s[-1:]) + lineEnd)
    elif s == b'.':
        output.METHOD_NAME(quote(s) + lineEnd)
    else:
        output.METHOD_NAME(s + lineEnd)