def METHOD_NAME(*, db_session, organization_in: OrganizationCreate) -> Organization:
    """Gets an existing or creates a new organization."""
    if organization_in.id:
        q = db_session.query(Organization).filter(Organization.id == organization_in.id)
    else:
        q = db_session.query(Organization).filter_by(**organization_in.dict(exclude={"id"}))
    instance = q.first()
    if instance:
        return instance
    return create(db_session=db_session, organization_in=organization_in)