def __getattr__(self, name: str) -> Var:
        """Get an attribute of the var.

        Args:
            name: The name of the attribute.

        Raises:
            VarAttributeError: The State var has no such attribute or may have been annotated wrongly.

        Returns:
            The attribute of the var.
        """
        if name.startswith("__") and name.endswith("__"):
            return getattr(super(type(self), self), name)

        var_type = self._var_type

        var_type = types.value_inside_optional(var_type)

        fixed_type = get_origin(var_type) or var_type

        if (
            is_typeddict(fixed_type)
            or (isclass(fixed_type) and not safe_issubclass(fixed_type, Mapping))
            or (fixed_type in types.UnionTypes)
        ):
            attribute_type = get_attribute_access_type(var_type, name)
            if attribute_type is None:
                msg = (
                    f"The State var `{self!s}` of type {escape(str(self._var_type))} has no attribute '{name}' or may have been annotated "
                    f"wrongly."
                )
                raise VarAttributeError(msg)
            return ObjectItemOperation.create(self, name, attribute_type).guess_type()
        return ObjectItemOperation.create(self, name).guess_type()
Get an attribute of the var.

        Args:
            name: The name of the attribute.

        Raises:
            VarAttributeError: The State var has no such attribute or may have been annotated wrongly.

        Returns:
            The attribute of the var.
        
reflex/vars/object.py