Revert "Revert "[#2242] add pep for writing session variable""

This reverts commit 3c754d0e2cf6ba704717d0f25cd647e4a59b5116.

This prepares the repo for the new commit.
[#2242] prevent it from updating constant output var