code: def setattr_recursive(obj, att, val):
      """
      Set nested attribute of obj
      Example: setattr_recursive(obj, 'a.b.c', val) is equivalent to obj.a.b.c = val
      """
      if "." in att:
          obj = getattr_recursive(obj, ".".join(att.split(".")[:-1]))
      setattr(obj, att.split(".")[-1], val)
  
file_path: NeMo/nemo/collections/multimodal/parts/utils.py
imports: import os
  from typing import Any, Callable, Tuple
  import torch
  from omegaconf import DictConfig, open_dict
  from PIL import Image
  from pytorch_lightning import Trainer
  from pytorch_lightning.plugins.environments import TorchElasticEnvironment
  from nemo.collections.nlp.parts.nlp_overrides import NLPDDPStrategy, NLPSaveRestoreConnector
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling a global function with example usage: setattr_recursive(obj, att, val) without return types