code: def streamlit_read(path, binary=False):
      """Opens a context to read this file relative to the streamlit path.
  
      For example:
  
      with streamlit_read('foo.txt') as foo:
          ...
  
      opens the file `.streamlit/foo.txt`
  
      path   - the path to write to (within the streamlit directory)
      binary - set to True for binary IO
      """
      filename = get_streamlit_file_path(path)
      if os.stat(filename).st_size == 0:
          raise util.Error('Read zero byte file: "%s"' % filename)
  
      mode = "r"
      if binary:
          mode += "b"
      with open(os.path.join(CONFIG_FOLDER_NAME, path), mode) as handle:
          yield handle
  
file_path: streamlit/lib/streamlit/file_util.py
imports: import contextlib
  import errno
  import fnmatch
  import io
  import os
  from pathlib import Path
  from streamlit import env_util, util
  from streamlit.string_util import is_binary_string
label_desc: Use image node_id 2 for calling a global function with example usage: streamlit_read(path, binary) without return types