code: def test_upgrade_model_progress_already_valid():
      # Verify that we don't make changes to already-valid model progress dicts.
      valid_model_progress = {
          BATCH_SIZE: 128,
          "best_eval_metric_checkpoint_number": 7,
          "best_eval_metric_epoch": 6,
          "best_eval_metric_steps": 35,
          "best_eval_metric_value": 0.719,
          "best_eval_test_metrics": {
              "Survived": {
                  "accuracy": 0.634,
                  "loss": 3.820,
                  "roc_auc": 0.598,
              },
              "combined": {"loss": 3.820},
          },
          "best_eval_train_metrics": {
              "Survived": {
                  "accuracy": 0.682,
                  "loss": 4.006,
                  "roc_auc": 0.634,
              },
              "combined": {"loss": 4.006},
          },
          "best_eval_validation_metrics": {
              "Survived": {
                  "accuracy": 0.719,
                  "loss": 4.396,
                  "roc_auc": 0.667,
              },
              "combined": {"loss": 4.396},
          },
          "best_increase_batch_size_eval_metric": float("inf"),
          "checkpoint_number": 12,
          "epoch": 12,
          "last_increase_batch_size": 0,
          "last_increase_batch_size_eval_metric_improvement": 0,
          "last_increase_batch_size_steps": 0,
          "last_learning_rate_reduction": 0,
          "last_learning_rate_reduction_steps": 0,
          "learning_rate": 0.001,
          "num_increases_batch_size": 0,
          "num_reductions_learning_rate": 0,
          "steps": 60,
          "test_metrics": {
              "Survived": {
                  "accuracy": [
                      [0, 5, 0.651],
                      [1, 10, 0.651],
                  ],
                  "loss": [
                      [0, 5, 4.130],
                      [1, 10, 4.074],
                  ],
                  "roc_auc": [
                      [0, 5, 0.574],
                      [1, 10, 0.595],
                  ],
              },
              "combined": {
                  "loss": [
                      [0, 5, 4.130],
                      [1, 10, 4.074],
                  ]
              },
          },
          "train_metrics": {
              "Survived": {
                  "accuracy": [
                      [0, 5, 0.6875],
                      [1, 10, 0.6875],
                  ],
                  "loss": [
                      [0, 5, 4.417],
                      [1, 10, 4.344],
                  ],
                  "roc_auc": [
                      [0, 5, 0.628],
                      [1, 10, 0.629],
                  ],
              },
              "combined": {
                  "loss": [
                      [0, 5, 4.417],
                      [1, 10, 4.344],
                  ]
              },
          },
          "tune_checkpoint_num": 0,
          "validation_metrics": {
              "Survived": {
                  "accuracy": [
                      [0, 5, 0.696],
                      [1, 10, 0.696],
                  ],
                  "loss": [
                      [0, 5, 4.494],
                      [1, 10, 4.473],
                  ],
                  "roc_auc": [
                      [0, 5, 0.675],
                      [1, 10, 0.671],
                  ],
              },
              "combined": {
                  "loss": [
                      [0, 5, 4.494],
                      [1, 10, 4.473],
                  ]
              },
          },
      }
  
      unchanged_model_progress = upgrade_model_progress(
          valid_model_progress
      )
      assert unchanged_model_progress == valid_model_progress
  
imports: import copy
  import math
  from typing import Any, Dict
  import pytest
  from ludwig.constants import BATCH_SIZE, BFILL, CLASS_WEIGHTS, DEFAULTS, EVAL_BATCH_SIZE, EXECUTOR, HYPEROPT, INPUT_FEATURES, LEARNING_RATE_SCHEDULER, LOSS, NUMBER, OUTPUT_FEATURES, PREPROCESSING, SCHEDULER, SPLIT, TRAINER, TYPE
  from ludwig.schema.model_config import ModelConfig
  from ludwig.schema.trainer import ECDTrainerConfig
  from ludwig.utils.backward_compatibility import _update_backend_cache_credentials, _upgrade_encoder_decoder_params, _upgrade_feature, _upgrade_preprocessing_split, upgrade_config_dict_to_latest_version, upgrade_missing_value_strategy, upgrade_model_progress
  from ludwig.utils.trainer_utils import TrainerMetric
label_desc: Use image node_id 12 for calling a global function with example usage: test_upgrade_model_progress_already_valid() without return types