def METHOD_NAME(
    postgres_conn_id: str,
    popularity_refresh: PopularityRefresh,
    last_updated_time: datetime,
):
    """
    Build a list of DagRun confs for each provider of this media type. The confs will
    be used by the `batched_update` DAG to perform a batched update of all existing
    records, to recalculate their standardized_popularity with the new popularity
    constant. Providers that do not support popularity data are omitted.
    """
    # For the media type, get a list of the providers who support popularity data
    providers = sql.get_providers_with_popularity_data_for_media_type(
        postgres_conn_id, popularity_refresh.media_type
    )
    # For each provider, create a conf that will be used by the batched_update to
    # refresh standardized popularity scores.
    return [
        {
            # Uniquely identify the query
            "query_id": (
                f"{provider}_popularity_refresh_{last_updated_time.strftime('%Y%m%d')}"
            ),
            "table_name": popularity_refresh.media_type,
            # Query used to select records that should be refreshed
            "select_query": (
                f"WHERE provider='{provider}' AND updated_on <"
                f" '{last_updated_time.strftime('%Y-%m-%d %H:%M:%S')}'"
            ),
            # Query used to update the standardized_popularity
            "update_query": sql.format_update_standardized_popularity_query(
                popularity_refresh.media_type
            ),
            "batch_size": 10_000,
            "update_timeout": (
                popularity_refresh.refresh_popularity_batch_timeout.total_seconds()
            ),
            "dry_run": False,
            "resume_update": False,
        }
        for provider in providers
    ]