class_docstr: Writes inference results to a TextIO as human-readable text.
class_docstr_tok: ["Writes","inference","results","to","a","TextIO","as","human-readable","text","."]
docstr: Initializes the renderer.
  
  stream: the `TextIO` to write outputs to.
docstr_tok: ["Initializes","the","renderer",".","stream",":","the","`","TextIO","`","to","write","outputs","to","."]
code: def __init__(self, stream: TextIO, close_after_render: bool) -> None:
      """Initializes the renderer.
  
      stream: the `TextIO` to write outputs to.
      """
      self.stream = stream
      self.close_after_render = close_after_render
  
file_path: metricflow/metricflow/inference/renderer/stream.py
imports: from __future__ import annotations
  import sys
  from collections import defaultdict
  from typing import Dict, List, TextIO
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.inference.models import InferenceResult
  from metricflow.inference.renderer.base import InferenceRenderer
label_desc: Use image node_id 1 to create a new StreamInferenceRenderer object from inherited base classes: InferenceRenderer with example: obj = StreamInferenceRenderer(stream, close_after_render)