code: def reader(stream, dialect=DIALECT, encoding=False, **fmtparams):
      r"""CSV reader yielding lists of ``unicode`` strings (PY3: ``str``).
  
      Args:
          stream: Iterable of text (``unicode``, PY3: ``str``) lines. If an
              ``encoding`` is given, iterable of encoded (``str``, PY3: ``bytes``)
              lines in the given (8-bit clean) ``encoding``.
          dialect: Dialect argument for the underlying :func:`py:csv.reader`.
          encoding: If not ``False`` (default): name of the encoding needed to
              decode the encoded (``str``, PY3: ``bytes``) lines from ``stream``.
          \**fmtparams: Keyword arguments (formatting parameters) for the
              underlying :func:`py:csv.reader`.
  
      Returns:
          A Python 3 :func:`py3:csv.reader` stand-in yielding a list of ``unicode`` strings
          (PY3: ``str``) for each row.
  
      >>> import io
      >>> text = u'Spam!,Spam!,Spam!\r\nSpam!,Lovely Spam!,Lovely Spam!\r\n'
      >>> with io.StringIO(text, newline='') as f:
      ...     for row in reader(f):
      ...         print(', '.join(row))
      Spam!, Spam!, Spam!
      Spam!, Lovely Spam!, Lovely Spam!
  
      Raises:
          NotImplementedError: If ``encoding`` is not 8-bit clean.
      """
      if encoding is False:
          return UnicodeTextReader(stream, dialect, **fmtparams)
      if encoding is None:
          encoding = none_encoding()
      if not is_8bit_clean(encoding):
          raise NotImplementedError
      return UnicodeBytesReader(stream, dialect, encoding, **fmtparams)
  
imports: import csv
  from ._common import ENCODING, DIALECT
  from ._common import none_encoding, is_8bit_clean, csv_args
  from ._dispatch import register_reader
  from ._workarounds import warn_if_issue31590
label_desc: Use image node_id 1 for calling a global function with example usage: reader(stream, dialect, encoding) and returns: UnicodeBytesReader, UnicodeTextReader