def get_var_for_field(cls: type[BaseState], name: str, f: Field):
    """Get a Var instance for a state field.

    Args:
        cls: The state class.
        name: The name of the field.
        f: The Field instance.

    Returns:
        The Var instance.
    """
    field_name = format.format_state_name(cls.get_full_name()) + "." + name

    return dispatch(
        field_name=field_name,
        var_data=VarData.from_state(cls, name),
        result_var_type=f.outer_type_,
    )
Get a Var instance for a state field.

    Args:
        cls: The state class.
        name: The name of the field.
        f: The Field instance.

    Returns:
        The Var instance.
    
reflex/state.py