def init_state_collection(state, dict_, key):
    """Initialize a collection attribute and return the collection adapter."""
    attr = state.manager[key].impl
    user_data = attr.initialize(state, dict_)
    return attr.get_collection(state, dict_, user_data)
