def match_state(exp_state, states):
    """
    Matches state values.
        - exp_state:
            A dictionary of expected state values, where
            the key is the state name, the value the expected state.
        - states:
            The state content of the state change event.
    Returns either True or False based on the match.
    """
    for exp_state_name, exp_state_val in exp_state.items():
        if exp_state_name not in states:
            return False

        if states[exp_state_name] != exp_state_val:
            return False

    return True