code: def get_state() -> fos.StateDescription:
      """Get the current state description singleton on the server if it
      exists. Otherwise, initializes and sets the state description with
      default values.
  
      Returns:
          the :class:`fiftyone.core.state.StateDescription` server singleton
      """
      global _state
      if _state is None:
          _state = fos.StateDescription()
  
      return _state
  
file_path: fiftyone/fiftyone/server/events.py
imports: from collections import defaultdict
  from dataclasses import asdict, dataclass
  import typing
  from datetime import datetime
  import asyncio
  from bson import json_util
  from sse_starlette import ServerSentEvent
  from starlette.requests import Request
  import fiftyone.core.context
  import fiftyone.core.dataset
  import fiftyone.core.odm
  from fiftyone.core.session.events import add_screenshot, CaptureNotebookCell, CloseSession, DeactivateNotebookCell, ReactivateNotebookCell, dict_factory, EventType, ListenPayload, Refresh, SelectLabels, SelectSamples, SetColorScheme, SetGroupSlice, SetSpaces, StateUpdate, SetFieldVisibilityStage
  import fiftyone.core.state
  import fiftyone.core.utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_state() and returns: _state