@utilities.arguments_not_none<EOL><INDENT>def get_resource_by_agent(self, agent_id):<DEDENT>
collection = JSONClientValidated('<STR_LIT>',<EOL>collection='<STR_LIT>',<EOL>runtime=self._runtime)<EOL>result = collection.find_one(<EOL>dict({'<STR_LIT>': {'<STR_LIT>': [str(agent_id)]}},<EOL>**self._view_filter()))<EOL>return objects.Resource(<EOL>osid_object_map=result,<EOL>runtime=self._runtime,<EOL>proxy=self._proxy)<EOL>
Gets the ``Resource`` associated with the given agent.

        arg:    agent_id (osid.id.Id): ``Id`` of the ``Agent``
        return: (osid.resource.Resource) - associated resource
        raise:  NotFound - ``agent_id`` is not found
        raise:  NullArgument - ``agent_id`` is ``null``
        raise:  OperationFailed - unable to complete request
        raise:  PermissionDenied - authorization failure
        *compliance: mandatory -- This method must be implemented.*