def sanity_check_states(states_spec):
<EOL>states = copy.deepcopy(states_spec)<EOL>is_unique = ('<STR_LIT>' in states)<EOL>if is_unique:<EOL><INDENT>states = dict(state=states)<EOL><DEDENT>for name, state in states.items():<EOL><INDENT>if isinstance(state['<STR_LIT>'], int):<EOL><INDENT>state['<STR_LIT>'] = (state['<STR_LIT>'],)<EOL><DEDENT>if '<STR_LIT:type>' not in state:<EOL><INDENT>state['<STR_LIT:type>'] = '<STR_LIT:float>'<EOL><DEDENT><DEDENT>return states, is_unique<EOL>
Sanity checks a states dict, used to define the state space for an MDP.
Throws an error or warns if mismatches are found.

Args:
    states_spec (Union[None,dict]): The spec-dict to check (or None).

Returns: Tuple of 1) the state space desc and 2) whether there is only one component in the state space.