code: def main(cfg):
      logging.info(
          "\n\n************** Experiment configuration ***********"
      )
      logging.info(f"\n{OmegaConf.to_yaml(cfg)}")
  
      torch.backends.cuda.matmul.allow_tf32 = True
  
      if cfg.model.with_prior_preservation:
          prepare_reg_data(cfg)
      parallel_state.destroy_model_parallel()
  
      trainer = MegatronTrainerBuilder(cfg).create_trainer()
  
      exp_manager(trainer, cfg.exp_manager)
  
      model = MegatronDreamBooth(cfg.model, trainer)
  
      trainer.fit(model)
  
file_path: NeMo/examples/multimodal/text_to_image/dreambooth/dreambooth.py
imports: import os
  import torch
  from omegaconf import OmegaConf
  from nemo.collections.multimodal.models.text_to_image.dreambooth.dreambooth import MegatronDreamBooth
  from nemo.collections.multimodal.models.text_to_image.stable_diffusion.ldm.ddpm import MegatronLatentDiffusion
  from nemo.collections.multimodal.parts.stable_diffusion.pipeline import pipeline
  from nemo.collections.multimodal.parts.utils import setup_trainer_and_model_for_inference
  from nemo.collections.nlp.parts.megatron_trainer_builder import MegatronTrainerBuilder
  from nemo.core.config import hydra_runner
  from nemo.utils import logging
  from nemo.utils.exp_manager import exp_manager
label_desc: Use image node_id 2 for calling a global function with example usage: main(cfg) without return types