code: def get_session_state(**kwargs: Any) -> SessionState:
      """Gets a SessionState object for the current session.
  
      Creates a new object if necessary.
      """
      this_session = get_current_session()
      # Got the session object! Now let's attach some state into it.
      if not hasattr(this_session, "_custom_session_state"):
          this_session._custom_session_state = SessionState(**kwargs)
  
      return this_session._custom_session_state
  
file_path: opyrator/src/opyrator/ui/streamlit_utils.py
imports: from typing import Any, Dict
label_desc: Use image node_id 2 for calling a global function with example usage: get_session_state() and returns: this_session