def rotunicode(io_object, decode=False):
    """Rotate ASCII <-> non-ASCII characters in a file.

    :param io_object:
        The file object to convert.
    :type io_object:
        :class:`io.TextIOWrapper`
    :param decode:
        If True, perform a rotunicode-decode (rotate from non-ASCII to ASCII).
        Defaults to False (rotate from ASCII to non-ASCII).
    :type decode:
        `bool`
    :return:
        Yield the converted lines of the file.
    :rtype:
        `generator` of `unicode`
    """
    rotu_fn = get_rotunicode_function_for_decode_argument(decode=decode)
    return map(rotu_fn, map(safe_unicode, stream_file_lines(io_object)))