code: def __init__(
      self,
      states: Sequence[FsmState],
      table: FsmTableWithContext[T_FsmInputs, T_FsmContext],
  ) -> None:
      self._states = states
      self._table = table
      self._state_dict = {type(s): s for s in states}
      self._state = self._state_dict[type(states[0])]
  
imports: import sys
  from abc import abstractmethod
  from dataclasses import dataclass
  from typing import Callable, Dict, Generic, Optional, Sequence, Type, TypeVar, Union
label_desc: Use image node_id 1 to create a new FsmWithContext object from inherited base classes: Generic with example: obj = FsmWithContext(states, table)