def get_commenting_agent(self):
if not self.has_commentor():<EOL><INDENT>raise errors.IllegalState('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>from ..authentication import managers<EOL><DEDENT>except ImportError:<EOL><INDENT>raise errors.OperationFailed('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>mgr = managers.AuthenticationManager()<EOL><DEDENT>except:<EOL><INDENT>raise errors.OperationFailed('<STR_LIT>')<EOL><DEDENT>if not mgr.supports_agent_lookup():<EOL><INDENT>raise errors.OperationFailed('<STR_LIT>')<EOL><DEDENT>try:<EOL><INDENT>osid_object = mgr.get_agent_lookup_session().get_agent(self.get_commenting_agent_id())<EOL><DEDENT>except:<EOL><INDENT>raise errors.OperationFailed()<EOL><DEDENT>else:<EOL><INDENT>return osid_object<EOL><DEDENT>
Gets the agent who created this comment.

        return: (osid.authentication.Agent) - the ``Agent``
        raise:  OperationFailed - unable to complete request
        *compliance: mandatory -- This method must be implemented.*