@utilities.arguments_not_none<EOL><INDENT>def set_agent(self, agent_id):<DEDENT>
<EOL>if self.get_agent_metadata().is_read_only():<EOL><INDENT>raise errors.NoAccess()<EOL><DEDENT>if not self._is_valid_id(agent_id):<EOL><INDENT>raise errors.InvalidArgument()<EOL><DEDENT>self._my_map['<STR_LIT>'] = str(agent_id)<EOL>
Sets the agent.

        arg:    agent_id (osid.id.Id): the new agent
        raise:  InvalidArgument - ``agent_id`` is invalid
        raise:  NoAccess - ``Metadata.isReadOnly()`` is ``true``
        raise:  NullArgument - ``agent_id`` is ``null``
        *compliance: mandatory -- This method must be implemented.*