def _get_sub_package_provider_session(self, sub_package, 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>manager = self._get_sub_package_provider_manager(sub_package)<EOL>try:<EOL><INDENT>session = self._instantiate_session('<STR_LIT>' + session_name + '<STR_LIT>',<EOL>proxy=self._proxy,<EOL>manager=manager)<EOL><DEDENT>except AttributeError:<EOL><INDENT>session = self._instantiate_session('<STR_LIT>' + session_name,<EOL>proxy=self._proxy,<EOL>manager=manager)<EOL><DEDENT>self._set_bank_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 from a sub-package