def validate_state_dict(state_dict):
    """Validates state dict.

    Args:
        state_dict: dict. The dict representation of State object.

    Returns:
        State. The corresponding State domain object.
    """
    state_object = state_domain.State.from_dict(state_dict) # type: ignore[no-untyped-call]
    state_object.validate(
        exp_param_specs_dict=None, allow_null_interaction=True)
    # State dict is used as dictionary form in the handler and the data is not
    # transferred into the domain layer. Hence dict form of the data is returned
    # after schema validation.
    return state_dict