code: def get_directory_size(directory: str) -> int:
      """Return the size of a directory in bytes."""
      total_size = 0
      for dirpath, _, filenames in os.walk(directory):
          for f in filenames:
              fp = os.path.join(dirpath, f)
              total_size += os.path.getsize(fp)
      return total_size
  
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 9 for calling a global function with example usage: get_directory_size(directory) and returns: total_size