def child_state2(test_state) -> ChildState2:
    """A second child state.

    Args:
        test_state: A test state.

    Returns:
        A second test child state.
    """
    child_state2 = test_state.get_substate([ChildState2.get_name()])
    assert child_state2 is not None
    return child_state2
A second child state.

    Args:
        test_state: A test state.

    Returns:
        A second test child state.
    
tests/units/test_state.py