code: def _is_in_streamlit_package(file: str) -> bool:
      """True if the given file is part of the streamlit package."""
      try:
          common_prefix = os.path.commonprefix(
              [os.path.realpath(file), _STREAMLIT_DIR]
          )
      except ValueError:
          # Raised if paths are on different drives.
          return False
  
      return common_prefix == _STREAMLIT_DIR
  
file_path: streamlit/lib/streamlit/elements/exception.py
imports: import os
  import traceback
  from typing import TYPE_CHECKING, List, Optional, cast
  from typing_extensions import Final
  import streamlit
  from streamlit.errors import MarkdownFormattedException, StreamlitAPIException, StreamlitAPIWarning, StreamlitDeprecationWarning, UncaughtAppException
  from streamlit.logger import get_logger
  from streamlit.proto.Exception_pb2 import Exception
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 4 for calling a global function with example usage: _is_in_streamlit_package(file) and returns: unknown, False