code: def test_lr_schedule_compared_to_mmf_is_same(self):
      config = get_config_with_defaults(
          {
              "training": {
                  "max_updates": 8,
                  "max_epochs": None,
                  "lr_scheduler": True,
              }
          }
      )
  
      mmf_trainer = get_mmf_trainer(config=config)
      mmf_trainer.lr_scheduler_callback = LRSchedulerCallback(
          config, mmf_trainer
      )
      mmf_trainer.callbacks.append(mmf_trainer.lr_scheduler_callback)
      mmf_trainer.on_update_end = (
          mmf_trainer.lr_scheduler_callback.on_update_end
      )
      mmf_trainer.evaluation_loop = MagicMock(return_value=(None, None))
      mmf_trainer.training_loop()
  
      with patch(
          "mmf.trainers.lightning_trainer.get_mmf_env", return_value=""
      ):
          config = self._get_config(max_steps=8, lr_scheduler=True)
          trainer = get_lightning_trainer(config=config)
          trainer.trainer.fit(
              trainer.model, trainer.data_module.train_loader
          )
  
          mmf_trainer.model.to(trainer.model.device)
          last_model_param1 = list(mmf_trainer.model.parameters())[-1]
          last_model_param2 = list(trainer.model.parameters())[-1]
          self.assertTrue(
              torch.allclose(last_model_param1, last_model_param2)
          )
  
file_path: mmf/tests/trainers/lightning/test_lr_schedule.py
imports: import unittest
  from unittest.mock import MagicMock, patch
  import torch
  from mmf.trainers.callbacks.lr_scheduler import LRSchedulerCallback
  from tests.trainers.test_utils import get_config_with_defaults, get_lightning_trainer, get_mmf_trainer
label_desc: Use image node_id 2 for calling the TestLightningTrainerLRSchedule obj's underlying member method code with example usage: obj.test_lr_schedule_compared_to_mmf_is_same() without return types