code: def load_stream(fname, compressed=None):
      with _suitable_open(fname, compressed)(fname, mode="rb") as f:
          jreader = codecs.getreader("utf-8")(f)
          cont_line = ""
          for line in jreader:
              if not line.endswith("\n"):
                  cont_line += line
                  continue
              if cont_line:
                  cont_line += line
              else:
                  cont_line = line
              yield loads(cont_line)
              cont_line = ""
          if cont_line:  # The last line didn't end with a new line.
              yield loads(cont_line)
  
file_path: datalad/datalad/support/json_py.py
imports: import io
  import codecs
  from os.path import dirname, exists, lexists
  from os import makedirs
  import os
  import os.path
  import json
  from datalad.support.exceptions import CapturedException
  from ..log import lgr
label_desc: Use image node_id 6 for calling a global function with example usage: load_stream(fname, compressed) without return types