async def METHOD_NAME(
    self, group_id: str, /, data: UpdateGroupRequest
) -> Union[r200[GroupResponse], r404]:
    """
    Update a group.
    Updates a group's name or permissions.
    Permissions that are not included in the ``permissions`` object will retain
    their previous setting.
    Status Codes:
        200: Successful operation
        404: Group not found
    """
    try:
        group = await get_data_from_req(self.request).groups.update(group_id, data)
    except ResourceNotFoundError:
        raise NotFound()
    return json_response(GroupResponse.parse_obj(group))