def METHOD_NAME(self, new_states):
    """
    Check settings for existence of states, required states
    """
    if not new_states:
        raise CommandError('settings.RETIREMENT_STATES does not exist or is empty.')
    if not set(REQUIRED_STATES).issubset(set(new_states)):
        raise CommandError('settings.RETIREMENT_STATES ({}) does not contain all required states '
                           '({})'.format(new_states, REQ_STR))
    # Confirm that the start and end states are in the right places
    if new_states.index(START_STATE) != 0:
        raise CommandError(f'{START_STATE} must be the first state')
    num_end_states = len(END_STATES)
    if new_states[-num_end_states:] != END_STATES:
        raise CommandError('The last {} states must be these (in this order): '
                           '{}'.format(num_end_states, END_STATES))