def METHOD_NAME(store: FeatureStore, for_batch_scoring):
    end_date = (
        datetime.now().replace(microsecond=0, second=0, minute=0).astimezone(tz=utc)
    )
    start_date = (end_date - timedelta(days=60)).astimezone(tz=utc)
    project_name = yaml.safe_load(open("feature_repo/feature_store.yaml"))["project"]
    table_name = f"{project_name}_feast_driver_hourly_stats"
    # For batch scoring, we want the latest timestamps
    if for_batch_scoring:
        print(
            "Generating a list of all unique entities in a time window for batch scoring"
        )
        # We use a group by since we want all distinct driver_ids.
        entity_sql = f"""
            SELECT
                "driver_id",
                CURRENT_TIMESTAMP() as "event_timestamp"
            FROM {store.get_data_source(table_name).get_table_query_string()}
            WHERE "event_timestamp" BETWEEN '{start_date}' AND '{end_date}'
            GROUP BY "driver_id"
        """
    else:
        print("Generating training data for all entities in a time window")
        # We don't need a group by if we want to generate training data
        entity_sql = f"""
            SELECT
                "driver_id",
                "event_timestamp"
            FROM {store.get_data_source(table_name).get_table_query_string()}
            WHERE "event_timestamp" BETWEEN '{start_date}' AND '{end_date}'
        """
    training_df = store.get_historical_features(
        entity_df=entity_sql,
        features=[
            "driver_hourly_stats:conv_rate",
            "driver_hourly_stats:acc_rate",
            "driver_hourly_stats:avg_daily_trips",
        ],
    ).to_df()
    print(training_df.head())