def _get_provider_session(self, session_name, proxy=None):
agent_key = self._get_agent_key(proxy)<EOL>if session_name in self._provider_sessions[agent_key]:<EOL><INDENT>return self._provider_sessions[agent_key][session_name]<EOL><DEDENT>else:<EOL><INDENT>session = self._instantiate_session('<STR_LIT>' + session_name, self._proxy)<EOL>self._set_agency_view(session)<EOL>if self._session_management != DISABLED:<EOL><INDENT>self._provider_sessions[agent_key][session_name] = session<EOL><DEDENT>return session<EOL><DEDENT>
Gets the session for the provider