def _get_provider_session(self, session_name):
agent_key = self._get_agent_key()<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_class = getattr(self._provider_manager, '<STR_LIT>' + session_name + '<STR_LIT>')<EOL>if self._proxy is None:<EOL><INDENT>if '<STR_LIT>' in session_name:<EOL><INDENT>session = session_class('<STR_LIT>', self._catalog.get_id())<EOL><DEDENT>else:<EOL><INDENT>session = session_class(self._catalog.get_id())<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if '<STR_LIT>' in session_name:<EOL><INDENT>session = session_class('<STR_LIT>', self._catalog.get_id(), self._proxy)<EOL><DEDENT>else:<EOL><INDENT>session = session_class(self._catalog.get_id(), self._proxy)<EOL><DEDENT><DEDENT>self._set_bin_view(session)<EOL>self._set_object_view(session)<EOL>self._set_operable_view(session)<EOL>self._set_containable_view(session)<EOL>if self._session_management != DISABLED:<EOL><INDENT>self._provider_sessions[agent_key][session_name] = session<EOL><DEDENT>return session<EOL><DEDENT>
Returns the requested provider session.

        Instantiates a new one if the named session is not already known.