code: def forward(self, *args):
      if torch.is_autocast_enabled():
          from_dtype = args[0].dtype
          with torch.cuda.amp.autocast(enabled=False):
              ret = self.mod.forward(
                  *cast_all(
                      args,
                      from_dtype=from_dtype,
                      to_dtype=torch.float32,
                  )
              )
              return cast_all(
                  ret, from_dtype=torch.float32, to_dtype=from_dtype
              )
      else:
          return self.mod.forward(*args)
  
file_path: NeMo/nemo/utils/cast_utils.py
imports: from contextlib import nullcontext
  import torch
label_desc: Use image node_id 2 for calling the CastToFloatAll obj's underlying member method code with example usage: obj.forward() and returns: self, cast_all