def METHOD_NAME(state: State) -> State:
    # wrapper state variables must be in double precision
    cast_state = {}
    for name in state:
        if state[name].values.dtype == np.float32:
            cast_state[name] = (
                state[name]
                .astype(np.float64, casting="same_kind")
                .assign_attrs(state[name].attrs)
            )
        else:
            cast_state[name] = state[name]
    return cast_state