def edit(self, appointment_group, **kwargs):
if isinstance(appointment_group, dict) and '<STR_LIT>' in appointment_group:<EOL><INDENT>kwargs['<STR_LIT>'] = appointment_group<EOL><DEDENT>else:<EOL><INDENT>raise RequiredFieldMissing(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>response = self._requester.request(<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(self.id),<EOL>_kwargs=combine_kwargs(**kwargs)<EOL>)<EOL>if '<STR_LIT:title>' in response.json():<EOL><INDENT>super(AppointmentGroup, self).set_attributes(response.json())<EOL><DEDENT>return AppointmentGroup(self._requester, response.json())<EOL>
Modify this appointment group.

:calls: `PUT /api/v1/appointment_groups/:id \
<https://canvas.instructure.com/doc/api/appointment_groups.html#method.appointment_groups.update>`_

:param appointment_group: Dict containing an array of context codes
:type appointment_group: dict

:rtype: :class:`canvasapi.appointment_group.AppointmentGroup`