parameters: (state_key, state_value, state_sub_dict, mismatch_error_string)
docstring: Add or validate the record for the unsharded state_key in the state_sub_dict
docstring_summary: Add or validate the record for the unsharded state_key in the state_sub_dict
docstring_tokens: Add or validate the record for the unsharded state_key in the state_sub_dict
function: def _add_or_validate_unsharded_key(state_key, state_value, state_sub_dict, mismatch_error_string):
      """Add or validate the record for the unsharded state_key in the state_sub_dict"""
  
      if state_key in state_sub_dict:
          # state_dict already contains a record for this unsharded state.
          # assert that all values are the same for this previously loaded state
          assert (state_sub_dict[state_key] == state_value).all(), mismatch_error_string
      else:
          # create a new entry for this state in the state_sub_dict
          state_sub_dict[state_key] = state_value
function_tokens: def _add_or_validate_unsharded_key ( state_key , state_value , state_sub_dict , mismatch_error_string ) : if state_key in state_sub_dict : # state_dict already contains a record for this unsharded state. # assert that all values are the same for this previously loaded state assert ( state_sub_dict [ state_key ] == state_value ) . all ( ) , mismatch_error_string else : # create a new entry for this state in the state_sub_dict state_sub_dict [ state_key ] = state_value