code: def test_strategy_l2_lambda(self):
      torch.random.manual_seed(0)
      x = torch.randn(2, 50)
  
      module = DefaultModuleAdapter()
      module.add_adapter(name="temp", cfg=get_adapter_cfg())
      module.train()
      adapter = module.adapter_layer[module.get_enabled_adapters()[0]]
  
      # update the strategy
      adapter_strategy = (
          adapter_mixin_strategies.ResidualAddAdapterStrategy(
              l2_lambda=0.01
          )
      )
      adapter.adapter_strategy = adapter_strategy
  
      with torch.no_grad():
          access_mixins.AccessMixin.reset_registry(module)
          assert access_mixins.AccessMixin.is_access_enabled() is False
  
          assert adapter_strategy.stochastic_depth == 0.0
          assert adapter_strategy.l2_lambda > 0.0
  
          out = adapter_strategy.forward(x, adapter, module=module)
          assert (out - x).abs().mean() < 1e-5
  
          # extract losses
          assert access_mixins.AccessMixin.is_access_enabled() is True
          auxiliary_losses = (
              access_mixins.AccessMixin.get_module_registry(module)
          )
          loss = list(auxiliary_losses.values())[0]
          assert "adapter_loss" in loss
          assert loss["adapter_loss"][0] == torch.tensor(0.0)
  
imports: import pytest
  import torch
  from nemo.core import NeuralModule
  from nemo.core.classes.mixins import AdapterModuleMixin, access_mixins, adapter_mixin_strategies, adapter_mixins
  from nemo.utils import config_utils
label_desc: Use image node_id 4 for calling the TestAdapterStrategy obj's underlying member method code with example usage: obj.test_strategy_l2_lambda() without return types