code: def inject_dataloader_value_from_model_config(
      model_cfg: dict, dataloader_cfg: DictConfig, key: str
  ):
      """
      Extracts the label set provided at the top level of the model, and propagates it to the dataloader
      config.
  
      Args:
          model_cfg: A DictConfig representing the model's config.
          dataloader_cfg: A DictConfig representing the individual data loader
          key: A str value representing a key in the model_cfg whose value will be propagated to the
              dataloader config.
      """
      if key not in model_cfg:
          logging.info(
              f"Model level config does not contain `{key}`, please explicitly provide `{key}` to the dataloaders."
          )
          return
  
      if not isinstance(dataloader_cfg, DictConfig):
          dataloader_cfg = DictConfig(dataloader_cfg)
  
      # If key exists in the data loader config (either set explicitly or as a placeholder (via None))
      if key in dataloader_cfg:
          # Dataloader `labels` is provided and is non-null
          if (
              dataloader_cfg[key] is not None
              and model_cfg[key] != dataloader_cfg[key]
          ):
              # Model level `labels` dont match Dataloader level `labels`
              logging.warning(
                  f"`{key}` is explicitly provided to the data loader, and is different from "
                  f"the `{key}` provided at the model level config.\n"
                  f"If this is incorrect, please set the dataloader's `{key}` to None."
              )
  
          else:
              # Dataloader `key` is None or values match
              # Propagate from model level `key` (even if they match)
              with open_dict(dataloader_cfg):
                  dataloader_cfg[key] = model_cfg[key]
  
      else:
          # If key key doesnt even exist in dataloader_cfg, inject it explicitly
          with open_dict(dataloader_cfg):
              dataloader_cfg[key] = model_cfg[key]
  
imports: import copy
  import json
  import random
  from math import isclose
  from typing import Any, List, Optional, Union
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from omegaconf.listconfig import ListConfig
  from pytorch_lightning.callbacks import BasePredictionWriter
  from torch.utils.data import ChainDataset
  from nemo.collections.asr.data import audio_to_text, audio_to_text_dali
  from nemo.collections.asr.data.huggingface.hf_audio_to_text_dataset import get_hf_audio_to_text_bpe_dataset, get_hf_audio_to_text_char_dataset
  from nemo.collections.asr.parts.preprocessing.perturb import process_augmentations
  from nemo.collections.common.data.dataset import CodeSwitchedDataset, ConcatDataset
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: inject_dataloader_value_from_model_config(model_cfg, dataloader_cfg, key) without return types