Handle global variables and data in Modal Functions using modal.is_local to differentiate local and cloud execution.