def METHOD_NAME(
    model_dir_uri,
    training_start_date: str = '2019-02-01',
    training_end_date: str = '2019-03-01',
    testing_start_date: str = '2019-01-01',
    testing_end_date: str = '2019-02-01',
):
    # Preparing the training and testing data
    training_data = chicago_taxi_dataset_op(
        where='trip_start_timestamp >= "{}" AND trip_start_timestamp < "{}"'.format(str(training_start_date), str(training_end_date)),
        select='tips,trip_seconds,trip_miles,pickup_community_area,dropoff_community_area,fare,tolls,extras,trip_total',
        limit=10000,
    ).set_display_name('Training data').output
    testing_data = chicago_taxi_dataset_op(
        where='trip_start_timestamp >= "{}" AND trip_start_timestamp < "{}"'.format(str(testing_start_date), str(testing_end_date)),
        select='tips,trip_seconds,trip_miles,pickup_community_area,dropoff_community_area,fare,tolls,extras,trip_total',
        limit=10000,
    ).set_display_name('Testing data').output
    # Preparing the true values for the testing data
    true_values_table = pandas_transform_csv_op(
        table=testing_data,
        transform_code='''df = df[["tips"]]''',
    ).set_display_name('True values').output
    true_values = drop_header_op(true_values_table).output
    # Getting the active prod model
    prod_model_pointer_uri = str(model_dir_uri) + 'prod'
    get_prod_model_uri_task = download_from_gcs_op(
        gcs_path=prod_model_pointer_uri,
        default_data='',
    ).set_display_name('Get prod model')
    # Disabling cache reuse to always get new data
    get_prod_model_uri_task.execution_options.caching_strategy.max_cache_staleness = 'P0D'
    prod_model_uri = get_prod_model_uri_task.output
    # Training new model from scratch
    with kfp.dsl.Condition(prod_model_uri == ""):
        # Training
        model = xgboost_train_on_csv_op(
            training_data=training_data,
            label_column=0,
            objective='reg:squarederror',
            num_iterations=400,
        ).outputs['model']
        # Predicting
        predictions = xgboost_predict_on_csv_op(
            data=testing_data,
            model=model,
            label_column=0,
        ).output
        # Calculating the regression metrics
        metrics_task = calculate_regression_metrics_from_csv_op(
            true_values=true_values,
            predicted_values=predictions,
        )
        # Checking the metrics
        with kfp.dsl.Condition(metrics_task.outputs['mean_squared_error'] < 2.0):
            # Uploading the model
            model_uri = upload_to_gcs_unique_op(
                data=model,
                gcs_path_prefix=model_dir_uri,
            ).set_display_name('Upload model').output
            # Setting the model as prod
            upload_to_gcs_op(
                data=model_uri,
                gcs_path=prod_model_pointer_uri,
            ).set_display_name('Set prod model')
    # Training new model starting from the prod model
    with kfp.dsl.Condition(prod_model_uri != ""):
        # Downloading the model
        prod_model = download_from_gcs_op(prod_model_uri).output
        # Training
        model = xgboost_train_on_csv_op(
            training_data=training_data,
            starting_model=prod_model,
            label_column=0,
            objective='reg:squarederror',
            num_iterations=100,
        ).outputs['model']
        # Predicting
        predictions = xgboost_predict_on_csv_op(
            data=testing_data,
            model=model,
            label_column=0,
        ).output
        # Calculating the regression metrics
        metrics_task = calculate_regression_metrics_from_csv_op(
            true_values=true_values,
            predicted_values=predictions,
        )
        # Checking the metrics
        with kfp.dsl.Condition(metrics_task.outputs['mean_squared_error'] < 2.0):
            # Uploading the model
            model_uri = upload_to_gcs_unique_op(
                data=model,
                gcs_path_prefix=model_dir_uri,
            ).set_display_name('Upload model').output
            # Setting the model as prod
            upload_to_gcs_op(
                data=model_uri,
                gcs_path=prod_model_pointer_uri,
            ).set_display_name('Set prod model')