code: def set_course_nickname(self, course, nickname):
          
          from canvasapi.course import CourseNickname
  
          course_id = obj_or_id(course, "course", (Course,))
  
          response = self.__requester.request(
              'PUT',
              'users/self/course_nicknames/{}'.format(course_id),
              nickname=nickname
          )
          return CourseNickname(self.__requester, response.json())
docs: Set a nickname for the given course. This will replace the
          course's name in the output of subsequent API calls, as
          well as in selected places in the Canvas web user interface.
  
          :calls: `PUT /api/v1/users/self/course_nicknames/:course_id \
          <https://canvas.instructure.com/doc/api/users.html#method.course_nicknames.update>`_
  
          :param course: The ID of the course.
          :type course: :class:`canvasapi.course.Course` or int
          :param nickname: The nickname for the course.
          :type nickname: str
  
          :rtype: :class:`canvasapi.course.CourseNickname`