def update(self, **kwargs):
response = self._requester.request(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(<EOL>self._parent_type,<EOL>self._parent_id,<EOL>self.id<EOL>),<EOL>_kwargs=combine_kwargs(**kwargs)<EOL>)<EOL>return DiscussionTopic(self._requester, response.json())<EOL>
Updates an existing discussion topic for the course or group.

:calls: `PUT /api/v1/courses/:course_id/discussion_topics/:topic_id \
    <https://canvas.instructure.com/doc/api/discussion_topics.html#method.discussion_topics.update>`_

    or `PUT /api/v1/groups/:group_id/discussion_topics/:topic_id \
    <https://canvas.instructure.com/doc/api/discussion_topics.html#method.discussion_topics.update>`_

:rtype: :class:`canvasapi.discussion_topic.DiscussionTopic`