code: def extend_instance(obj, mixin):
      """Apply mixins to a class instance after creation"""
      base_cls = obj.__class__
      base_cls_name = obj.__class__.__name__
      obj.__class__ = type(base_cls_name, (mixin, base_cls), {})
  
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 3 for calling a global function with example usage: extend_instance(obj, mixin) without return types