def is_terminal(self):
        """Checks if the state is a terminal state.

        Returns
        -------
        bool :
            Whether the state is a terminal state or not.

        """
        if State.terminal_states is None:
            return False

        if isinstance(State.terminal_states, list):
            return self.name in State.terminal_states
        return self.name == self.terminal_states