def METHOD_NAME(limit=100):
    db = get_db_read_replica()
    with db.scoped_session() as session:
        results = (
            session.query(
                Play.play_item_id.distinct().label("play_item_id"),
                func.max(Play.created_at).label("max"),
            )
            .group_by(Play.play_item_id)
            .order_by(desc("max"))
            .limit(limit)
            .all()
        )
        track_ids = [result[0] for result in results]
        track_id_play_counts = get_track_play_counts(session, track_ids)
    return track_id_play_counts