code: def forward(self, sample_list):
      batch_tensor = sample_list[list(sample_list.keys())[0]]
      # Start should be fp32
      assert batch_tensor.dtype == torch.float32
      batch_tensor = self.classifier(batch_tensor)
  
      # In between operation should be fp16
      assert batch_tensor.dtype == torch.float16
      loss = torch.sum(batch_tensor)
  
      # Sum should convert it back to fp32
      assert loss.dtype == torch.float32
  
      model_output = {"losses": {"loss": loss}}
      return model_output
  
file_path: mmf/tests/trainers/test_fp16.py
imports: import unittest
  import torch
  from tests.test_utils import SimpleModel, skip_if_no_cuda
  from tests.trainers.test_training_loop import TrainerTrainingLoopMock
  from tests.trainers.test_utils import get_config_with_defaults
label_desc: Use image node_id 1 for calling the SimpleModelWithFp16Assert obj's underlying member method code with example usage: obj.forward(sample_list) and returns: model_output