def get_proxy(self, input_):
if input_._http_request is not None:<EOL><INDENT>authentication = DjangoAuthentication()<EOL>authentication.set_django_user(input_._http_request.user, input_._use_user_id)<EOL><DEDENT>elif input_._xblock_user is not None:<EOL><INDENT>authentication = XBlockAuthentication()<EOL>authentication.set_xblock_user(input_._xblock_user)<EOL><DEDENT>else:<EOL><INDENT>authentication = None<EOL><DEDENT>if authentication is not None:<EOL><INDENT>effective_agent_id = authentication.get_agent_id()<EOL><DEDENT>else:<EOL><INDENT>effective_agent_id = input_._effective_agent_id<EOL><DEDENT>if input_._locale is not None:<EOL><INDENT>locale = input_._locale<EOL><DEDENT>else:<EOL><INDENT>locale = None<EOL><DEDENT>return rules.Proxy(authentication=authentication,<EOL>effective_agent_id=effective_agent_id,<EOL>locale=locale)<EOL>
Gets a proxy.

        :param input: a proxy condition
        :type input: ``osid.proxy.ProxyCondition``
        :return: a proxy
        :rtype: ``osid.proxy.Proxy``
        :raise: ``NullArgument`` -- ``input`` is ``null``
        :raise: ``OperationFailed`` -- unable to complete request
        :raise: ``PermissionDenied`` -- authorization failure
        :raise: ``Unsupported`` -- ``input`` is not of this service

        *compliance: mandatory -- This method is must be implemented.*