def start(self):
		# generate sid
		if self.user=='Guest':
			sid = 'Guest'
		else:
			sid = frappe.generate_hash()

		self.data.user = self.user
		self.data.sid = sid
		self.data.data.user = self.user
		self.data.data.session_ip = frappe.local.request_ip
		if self.user != "Guest":
			self.data.data.update({
				"last_updated": frappe.utils.now(),
				"session_expiry": get_expiry_period(self.device),
				"full_name": self.full_name,
				"user_type": self.user_type,
				"device": self.device,
				"session_country": get_geo_ip_country(frappe.local.request_ip) if frappe.local.request_ip else None,
			})

		# insert session
		if self.user!="Guest":
			self.insert_session_record()

			# update user
			frappe.db.sql("""UPDATE tabUser SET last_login = %(now)s, last_ip = %(ip)s, last_active = %(now)s
				where name=%(name)s""", {
					"now": frappe.utils.now(),
					"ip": frappe.local.request_ip,
					"name": self.data['user']
				})

			frappe.db.commit()
Warn about unused static variables.
dataset/ETHPy150Open frappe/frappe/frappe/sessions.py/Session.start--crossover with--dataset/ETHPy150Open myint/cppclean/cpp/static_data.py/_find_unused_static_warnings