def deactivate(self, task):
ALLOWED_TASKS = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>if task not in ALLOWED_TASKS:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(<EOL>task,<EOL>'<STR_LIT:U+002C>'.join(ALLOWED_TASKS)<EOL>))<EOL><DEDENT>response = self._requester.request(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(self.course_id, self.id),<EOL>task=task<EOL>)<EOL>return Enrollment(self._requester, response.json())<EOL>
Delete, conclude, or deactivate an enrollment.

The following tasks can be performed on an enrollment: conclude, delete, \
inactivate, deactivate.

:calls: `DELETE /api/v1/courses/:course_id/enrollments/:id \
<https://canvas.instructure.com/doc/api/enrollments.html#method.enrollments_api.destroy>`_

:param task: The task to perform on the enrollment.
:type task: str
:rtype: :class:`canvasapi.enrollment.Enrollment`