def get_session(self, create=True):
msg = ("<STR_LIT>"<EOL>"<STR_LIT>".<EOL>format(self.__class__.__name__, create, (self.session is None), str(<EOL>self.session is not None and bool(self.session.session_id))))<EOL>logger.debug(msg)<EOL>if self.session and not create:  <EOL><INDENT>self.session.touch()  <EOL>return self.session<EOL><DEDENT>if (not self.session and create):<EOL><INDENT>if (not self.is_session_creation_enabled()):<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>raise ValueError(msg)<EOL><DEDENT>msg = ("<STR_LIT>", str(self.host))<EOL>logger.debug(msg)<EOL>session_context = self.create_session_context()<EOL>session = self.security_manager.start(session_context)<EOL>session.stop_session_callback = self.session_stopped<EOL>self.session = session<EOL><DEDENT>return self.session<EOL>
:type create:  bool