code: def test_target_last_layer(self, config0, config1):
      # We are targeting the last layer of the SimpleNet. Therefore, since the adapters only add their activations
      # to the output, the results should be commutative. This would *not* work if the adapters do something more
      # complex or if we target an earlier layer, because of the non-linearity would destroy the commutativity.
      input = torch.arange(90).reshape(9, 10).to(self.torch_device)
      # OFT is not commutative, as it's not a linear operation on the inputs
      is_commutative = not any(
          isinstance(config, OFTConfig) for config in [config0, config1]
      )
  
      self._check_mixed_outputs(
          SimpleNet,
          config0,
          config1,
          input,
          is_commutative=is_commutative,
      )
      self._check_merging(SimpleNet, config0, config1, input)
      self._check_unload(SimpleNet, config0, config1, input)
      self._check_disable(SimpleNet, config1, config0, input)
      self._check_loading(
          SimpleNet,
          config0,
          config1,
          input,
          is_commutative=is_commutative,
      )
  
imports: import copy
  import itertools
  import os
  import re
  import tempfile
  import unittest
  import torch
  from parameterized import parameterized
  from torch import nn
  from transformers import AutoModelForCausalLM
  from peft import AdaLoraConfig, LoHaConfig, LoKrConfig, LoraConfig, OFTConfig, PeftMixedModel, PrefixTuningConfig, get_peft_model
  from peft.tuners.tuners_utils import BaseTunerLayer
  from peft.utils import infer_device
label_desc: Use image node_id 8 for calling the TestMixedAdapterTypes obj's underlying member method code with example usage: obj.test_target_last_layer(config0, config1) without return types