def set_courses(self, course_ids=None):
if course_ids is None:<EOL><INDENT>raise NullArgument()<EOL><DEDENT>metadata = Metadata(**settings.METADATA['<STR_LIT>'])<EOL>if metadata.is_read_only():<EOL><INDENT>raise NoAccess()<EOL><DEDENT>if self._is_valid_input(course_ids, metadata, array=True):<EOL><INDENT>for course_id in course_ids:<EOL><INDENT>self._my_map['<STR_LIT>'].append(str(course_id))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise InvalidArgument<EOL><DEDENT>
Sets the courses.

        arg:    courseIds (osid.id.Id): the course Ids
        raise:  INVALID_ARGUMENT - courseIds is invalid
        raise:  NullArgument - courseIds is null
        raise:  NoAccess - metadata.is_read_only() is true
        compliance: mandatory - This method must be implemented.