code: def is_binary_string(inp):
      """Guess if an input bytesarray can be encoded as a string."""
      # From https://stackoverflow.com/a/7392391
      return bool(inp.translate(None, TEXTCHARS))
  
file_path: streamlit/lib/streamlit/string_util.py
imports: import re
  import textwrap
  from typing import TYPE_CHECKING, Any, Optional, Tuple, cast
  from streamlit.emojis import ALL_EMOJIS
  from streamlit.errors import StreamlitAPIException
label_desc: Use image node_id 7 for calling a global function with example usage: is_binary_string(inp) and returns: bool