code: def get_trainer(args):
      seed_everything(1)
  
      checkpoint = ModelCheckpoint(
          dirpath=os.path.join(args.exp_dir, args.exp_name)
          if args.exp_dir
          else None,
          monitor="monitoring_step",
          mode="max",
          save_last=True,
          filename="{epoch}",
          save_top_k=10,
      )
      lr_monitor = LearningRateMonitor(logging_interval="step")
      callbacks = [
          checkpoint,
          lr_monitor,
      ]
      return Trainer(
          sync_batchnorm=True,
          default_root_dir=args.exp_dir,
          max_epochs=args.epochs,
          num_nodes=args.num_nodes,
          devices=args.gpus,
          accelerator="gpu",
          strategy=DDPStrategy(find_unused_parameters=False),
          callbacks=callbacks,
          reload_dataloaders_every_n_epochs=1,
          gradient_clip_val=10.0,
      )
  
file_path: audio/examples/avsr/train.py
imports: import logging
  import os
  from argparse import ArgumentParser
  import sentencepiece
  from average_checkpoints import ensemble
  from pytorch_lightning import seed_everything, Trainer
  from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint
  from pytorch_lightning.strategies import DDPStrategy
  from transforms import get_data_module
label_desc: Use image node_id 1 for calling a global function with example usage: get_trainer(args) and returns: Trainer