code: def test_larc_mixed_precision(self):
      for opt_level in ["O0", "O1", "O2", "O3"]:
          model = MyModel(1)
  
          optimizer = LARC(
              torch.optim.SGD(
                  [{"params": model.parameters(), "lr": 0.25}],
                  momentum=0.125,
              )
          )
  
          model, optimizer = amp.initialize(
              model, optimizer, opt_level=opt_level, verbosity=0
          )
  
          optimizer.zero_grad()
          loss = model(self.x)
          with amp.scale_loss(loss, optimizer) as scaled_loss:
              scaled_loss.backward()
          optimizer.step()
  
file_path: apex/tests/L0/run_amp/test_larc.py
imports: import unittest
  import torch
  from torch import nn
  from torch.nn import Parameter
  from apex import amp
  from apex.parallel.LARC import LARC
  from utils import common_init
label_desc: Use image node_id 3 for calling the TestLARC obj's underlying member method code with example usage: obj.test_larc_mixed_precision() without return types