def _mark_dirty_computed_vars(self) -> None:
        """Mark ComputedVars that need to be recalculated based on dirty_vars."""
        # Append expired computed vars to dirty_vars to trigger recalculation
        self.dirty_vars.update(self._expired_computed_vars())
        # Append always dirty computed vars to dirty_vars to trigger recalculation
        self.dirty_vars.update(self._always_dirty_computed_vars)

        dirty_vars = self.dirty_vars
        while dirty_vars:
            calc_vars, dirty_vars = dirty_vars, set()
            for state_name, cvar in self._dirty_computed_vars(from_vars=calc_vars):
                if state_name == self.get_full_name():
                    defining_state = self
                else:
                    defining_state = self._get_root_state().get_substate(
                        tuple(state_name.split("."))
                    )
                defining_state.dirty_vars.add(cvar)
                actual_var = defining_state.computed_vars.get(cvar)
                if actual_var is not None:
                    actual_var.mark_dirty(instance=defining_state)
                if defining_state is self:
                    dirty_vars.add(cvar)
                else:
                    # mark dirty where this var is defined
                    defining_state._mark_dirty()
Mark ComputedVars that need to be recalculated based on dirty_vars.
reflex/state.py