docs: def reader(queue=None, is_unicode=False):
      """Returns a raw binary reader co-routine.
  
      Args:
          queue (Optional[BufferQueue]): The buffer read data for parsing, if ``None`` a
              new one will be created.
  
          is_unicode (Optional[bool]): True if all input data to this reader will be of unicode text type; False if all
              input data to this reader will be of binary type.
  
      Yields:
          IonEvent: parse events, will have an event type of ``INCOMPLETE`` if data is needed
              in the middle of a value or ``STREAM_END`` if there is no data **and** the parser
              is not in the middle of parsing a value.
  
              Receives :class:`DataEvent`, with :class:`ReadEventType` of ``NEXT`` or ``SKIP``
              to iterate over values; ``DATA`` or ``NEXT`` if the last event type was ``INCOMPLETE``;
              or ``DATA`` if the last event type was ``STREAM_END``.
  
              When the reader receives ``NEXT`` after yielding ``INCOMPLETE``, this signals to the reader
              that no further data is coming, and that any pending data should be flushed as either parse
              events or errors. This is **only** valid at the top-level, and will **only** result in a parse
              event if the last character encountered...
                  * was a digit or a decimal point in a non-timestamp, non-keyword numeric value; OR
                  * ended a valid partial timestamp; OR
                  * ended a keyword value (special floats, booleans, ``null``, and typed nulls); OR
                  * was part of an unquoted symbol token, or whitespace or the end of a comment following
                    an unquoted symbol token (as long as no colons were encountered after the token); OR
                  * was the closing quote of a quoted symbol token, or whitespace or the end of a comment
                    following a quoted symbol token (as long as no colons were encountered after the
                    token); OR
                  * was the final closing quote of a long string, or whitespace or the end of a comment
                    following a long string.
              If the reader successfully yields a parse event as a result of this, ``NEXT`` is the only
              input that may immediately follow. At that point, there are only two possible responses from
              the reader:
                  * If the last character read was the closing quote of an empty symbol following a long
                    string, the reader will emit a parse event representing a symbol value with empty text.
                    The next reader input/output event pair must be (``NEXT``, ``STREAM_END``).
                  * Otherwise, the reader will emit ``STREAM_END``.
              After that ``STREAM_END``, the user may later provide ``DATA`` to resume reading.
              If this occurs, the new data will be interpreted as if it were at the start of the stream
              (i.e. it can never continue the previous value), except that it occurs within the same symbol
              table context. This has the following implications (where ``<FLUSH>`` stands for the
              (``INCOMPLETE``, ``NEXT``) transaction):
                  * If the previously-emitted value was a numeric value (``int``, ``float``, ``decimal``,
                    ``timestamp``), the new data will never extend that value, even if it would be a valid
                    continuation. For example, ``123<FLUSH>456`` will always be emitted as two parse events
                    (ints ``123`` and ``456``), even though it would have been interpreted as ``123456``
                    without the ``<FLUSH>``.
                  * If the previously-emitted value was a symbol value or long string, the new data will
                    be interpreted as the start of a new value. For example, ``abc<FLUSH>::123`` will be
                    emitted as the symbol value ``'abc'``, followed by an error upon encountering ':' at the
                    start of a value, even though it would have been interpreted as the ``int`` ``123``
                    annotated with ``'abc'`` without the ``<FLUSH>``. The input ``abc<FLUSH>abc`` will be
                    emitted as the symbol value ``'abc'`` (represented by a :class:`SymbolToken`), followed by
                    another symbol value ``'abc'`` (represented by a ``SymbolToken`` with the same symbol ID),
                    even though it would have been interpreted as ``'abcabc'`` without the ``<FLUSH>``.
                    Similarly, ``'''abc'''<FLUSH>'''def'''`` will the interpreted as two strings (``'abc'``
                    and ``'def'``), even though it would have been interpreted as ``'abcdef'`` without the
                    ``<FLUSH>``.
  
              ``SKIP`` is only allowed within a container. A reader is *in* a container
              when the ``CONTAINER_START`` event type is encountered and *not in* a container
              when the ``CONTAINER_END`` event type for that container is encountered.
      """
      if queue is None:
          queue = BufferQueue(is_unicode)
      ctx = _HandlerContext(
          container=_C_TOP_LEVEL,
          queue=queue,
          field_name=None,
          annotations=None,
          depth=0,
          whence=None,
          value=None,
          ion_type=None,  # Top level
          pending_symbol=None
      )
      return reader_trampoline(_skip_trampoline(_container_handler(None, ctx)), allow_flush=True)