code: def _get_file_content_with_blocking_retries(file_path: str) -> bytes:
      content = b""
      # There's a race condition where sometimes file_path no longer exists when
      # we try to read it (since the file is in the process of being written).
      # So here we retry a few times using this loop. See issue #186.
      for i in range(_MAX_RETRIES):
          try:
              with open(file_path, "rb") as f:
                  content = f.read()
                  break
          except FileNotFoundError as e:
              if i >= _MAX_RETRIES - 1:
                  raise e
              time.sleep(_RETRY_WAIT_SECS)
      return content
  
file_path: streamlit/lib/streamlit/watcher/util.py
imports: import hashlib
  import os
  import time
  from pathlib import Path
  from typing import Optional
  from streamlit.util import HASHLIB_KWARGS
label_desc: Use image node_id 3 for calling a global function with example usage: _get_file_content_with_blocking_retries(file_path) and returns: content