def METHOD_NAME(
    user_email: str,
    subject: Subject,
    db_session: SessionLocal,
    service_id: int = None,
    role: ParticipantRoleType = ParticipantRoleType.participant,
) -> Participant:
    """Adds a participant to an incident or a case."""
    # we get or create a new individual
    individual = individual_service.get_or_create(
        db_session=db_session, project=subject.project, email=user_email
    )
    # we get or create a new participant
    subject_type = get_table_name_by_class_instance(subject)
    participant_role = ParticipantRoleCreate(role=role)
    participant = participant_service.get_or_create(
        db_session=db_session,
        subject_id=subject.id,
        subject_type=subject_type,
        individual_id=individual.id,
        service_id=service_id,
        participant_roles=[participant_role],
    )
    individual.participant.append(participant)
    subject.participants.append(participant)
    # TODO: Split this assignment depending on Obj type
    # we update the commander, reporter, scribe, or liaison foreign key
    if role == ParticipantRoleType.incident_commander:
        subject.commander_id = participant.id
        subject.commanders_location = participant.location
    elif role == ParticipantRoleType.reporter:
        subject.reporter_id = participant.id
        subject.reporters_location = participant.location
    elif role == ParticipantRoleType.scribe:
        subject.scribe_id = participant.id
    elif role == ParticipantRoleType.liaison:
        subject.liaison_id = participant.id
    elif role == ParticipantRoleType.observer:
        subject.observer_id = participant.id
    elif role == ParticipantRoleType.assignee:
        subject.assignee_id = participant.id
    # we add and commit the changes
    db_session.add(participant)
    db_session.add(individual)
    db_session.add(subject)
    db_session.commit()
    if subject_type == "case":
        event_service.log_case_event(
            db_session=db_session,
            source="Dispatch Core App",
            description=f"{individual.name} added to incident with {participant_role.role} role",
            case_id=subject.id,
        )
    if subject_type == "incident":
        event_service.log_incident_event(
            db_session=db_session,
            source="Dispatch Core App",
            description=f"{individual.name} added to incident with {participant_role.role} role",
            incident_id=subject.id,
        )
    return participant