code: def get_trainer_config():
      config = load_yaml(os.path.join("configs", "defaults.yaml"))
      return OmegaConf.merge(
          config,
          {
              "distributed": {},
              "run_type": "train_val",
              "training": {
                  "trainer": "lightning",
                  "detect_anomaly": False,
                  "evaluation_interval": 4,
                  "log_interval": 2,
                  "update_frequency": 1,
                  "fp16": False,
                  "batch_size": 1,
                  "batch_size_per_device": None,
                  "lr_scheduler": False,
                  "tensorboard": False,
                  "num_workers": 0,
                  "max_grad_l2_norm": 1,
                  "exit_on_nan_losses": True,
              },
              "optimizer": {
                  "type": "adam_w",
                  "params": {"lr": 5e-5, "eps": 1e-8},
              },
              "scheduler": {
                  "type": "warmup_linear",
                  "params": {
                      "num_warmup_steps": 8,
                      "num_training_steps": 8,
                  },
              },
              "trainer": {
                  "type": "lightning",
                  "params": {
                      "gpus": 1 if torch.cuda.is_available() else 0,
                      "num_nodes": 1,
                      "enable_checkpointing": False,
                      "deterministic": True,
                      "benchmark": False,
                      "gradient_clip_val": 0.0,
                      "val_check_interval": 4,
                      "log_every_n_steps": 2,
                      "progress_bar_refresh_rate": 0,
                      "accumulate_grad_batches": 1,
                      "precision": 32,
                      "num_sanity_val_steps": 0,
                      "limit_val_batches": 1.0,
                      "logger": False,
                  },
              },
          },
      )
  
file_path: mmf/tests/trainers/test_utils.py
imports: import os
  import torch
  from mmf.utils.build import build_optimizer
  from mmf.utils.configuration import load_yaml
  from omegaconf import OmegaConf
  from tests.test_utils import SimpleLightningModel, SimpleModel
  from tests.trainers.lightning.lightning_trainer_mock import LightningTrainerMock
  from tests.trainers.test_trainer_mocks import TrainerTrainingLoopMock
label_desc: Use image node_id 1 for calling a global function with example usage: get_trainer_config() and returns: OmegaConf