code: def test_strategy_stochasic_depth(self, stochastic_depth):
      torch.random.manual_seed(0)
      x = torch.randn(2, 50)
  
      module = DefaultModuleAdapter()
      module.add_adapter(name="temp", cfg=get_adapter_cfg())
  
      # extract adapter
      adapter = module.adapter_layer[module.get_enabled_adapters()[0]]
      # reinitialize the final layer of the adapter module (so that it is not zero init)
      adapter.module[-1].weight.data += 1
  
      # get just module output
      module.set_enabled_adapters("temp", enabled=False)
      module_out = module(x)
  
      # get module + adapter output
      module.set_enabled_adapters("temp", enabled=True)
      module_adapter_out = module(x)
  
      assert (
          module_out - module_adapter_out
      ).abs().sum() > 0  # results should not be the same after adapter forward now
  
      adapter_strategy = (
          adapter_mixin_strategies.ResidualAddAdapterStrategy(
              stochastic_depth=stochastic_depth
          )
      )
      adapter.adapter_strategy = adapter_strategy
  
      module.eval()
      with torch.inference_mode():  # stochastic depth disabled, no grad tracking
          assert (
              adapter.adapter_strategy.stochastic_depth
              == stochastic_depth
          )
  
          out = adapter_strategy.forward(
              module_out, adapter, module=module
          )
          assert (out - module_adapter_out).abs().mean() < 1e-5
  
      module.train()
      with torch.inference_mode():  # stochastic depth enabled, but no grad tracking during training mode
          out = adapter_strategy.forward(
              module_out, adapter, module=module
          )
  
          if stochastic_depth == 0.0:
              check = module_adapter_out
          else:
              check = module_out
          assert (out - check).abs().mean() < 1e-5
  
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 3 for calling the TestAdapterStrategy obj's underlying member method code with example usage: obj.test_strategy_stochasic_depth(stochastic_depth) without return types