[#2242] add pep for writing session variable