class_docstr: Base class for all adaptation methods that require per-layer modules.
  
  Make sure the 'adapter_modules_name' attribute is overriden in derived classes.
class_docstr_tok: ["Base","class","for","all","adaptation","methods","that","require","per-layer","modules",".","Make","sure","the","'adapter_modules_name","'","attribute","is","overriden","in","derived","classes","."]
code: def get_active_setup(self):
      if hasattr(self, "adapters_config"):
          # First check current context before falling back to defined setup
          context = AdapterSetup.get_context()
          if context is not None:
              adapter_setup = context.adapter_setup
          else:
              adapter_setup = self.adapters_config.active_setup
      else:
          adapter_setup = None
      skip_adapters = adapter_setup is None or (
          self.adapters_config.skip_layers is not None
          and self.layer_idx in self.adapters_config.skip_layers
      )
      if not skip_adapters and (
          len(
              set(self.adapter_modules.keys()) & adapter_setup.flatten()
          )
          > 0
      ):
          return adapter_setup
      else:
          return None
  
imports: from abc import ABCMeta, abstractmethod
  from typing import Collection, Dict, List, NamedTuple, Union
  import numpy
  import torch
  from torch import nn
  from ..composition import ALLOWED_NESTINGS, AdapterCompositionBlock, Average, BatchSplit, Fuse, Parallel, Split, Stack
  from ..context import AdapterSetup, ForwardContext
label_desc: Use image node_id 4 for calling the AdapterLayerBase obj's underlying member method code with example usage: obj.get_active_setup() and returns: adapter_setup, None