def METHOD_NAME(case_factory, event, attendees):
    event_case_id = event._case_id.hex
    event_group_id = event.event_id.hex
    attendee_case_type = get_attendee_case_type(event.domain)
    attendee_case_ids = (c.case_id for c in attendees)
    case_structures = []
    for case_id in attendee_case_ids:
        event_host = CaseStructure(case_id=event_case_id)
        attendee_host = CaseStructure(case_id=case_id)
        case_structures.append(CaseStructure(
            indices=[
                CaseIndex(
                    relationship='extension',
                    identifier='event-host',
                    related_structure=event_host,
                    related_type=EVENT_CASE_TYPE,
                ),
                CaseIndex(
                    relationship='extension',
                    identifier='attendee-host',
                    related_structure=attendee_host,
                    related_type=attendee_case_type,
                ),
            ],
            attrs={
                'case_type': EVENT_ATTENDEE_CASE_TYPE,
                'owner_id': event_group_id,
                'create': True,
            },
        ))
    case_factory.create_or_update_cases(case_structures)