code: def parsestream(stream, encoding=None):
      
      stack = engine.FilterStack()
      stack.enable_grouping()
      return stack.run(stream, encoding)
docs: Parses sql statements from file-like object.
  
      :param stream: A file-like object.
      :param encoding: The encoding of the stream contents (optional).
      :returns: A generator of :class:`~sqlparse.sql.Statement` instances.