def METHOD_NAME(project, ticket_event_list):
    for ticket_event_dict in ticket_event_list:
        ticket_event = models.TicketEvent.upsert(
            project,
            current_title=ticket_event_dict.get('title'),
            title=ticket_event_dict.get('title'),
            project=project,
        )
        for ticket_type_title in ticket_event_dict.get('ticket_types'):
            ticket_type = models.TicketType.upsert(
                project,
                current_name=None,
                current_title=ticket_type_title,
                project=project,
                title=ticket_type_title,
            )
            ticket_event.ticket_types.append(ticket_type)