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","."]
docstr: Adds a new adapter module to the layer.
  
  Args:
      adapter_name (str): The name of the new adapter to add.
      layer_idx (int):
          The index of the adapters layer (this should be set once by the first added adapter and the kept fix).
  
  Returns:
      bool: True if the adapter was added, False otherwise.
docstr_tok: ["Adds","a","new","adapter","module","to","the","layer",".","Args",":","adapter_name","(","str",")",":","The","name","of","the","new","adapter","to","add",".","layer_idx","(","int",")",":","The","index","of","the","adapters","layer","(","this","should","be","set","once","by","the","first","added","adapter","and","the","kept","fix",")",".","Returns",":","bool",":","True","if","the","adapter","was","added",",","False","otherwise","."]
code: def add_adapter(self, adapter_name: str, layer_idx: int) -> bool:
      """Adds a new adapter module to the layer.
  
      Args:
          adapter_name (str): The name of the new adapter to add.
          layer_idx (int):
              The index of the adapters layer (this should be set once by the first added adapter and the kept fix).
  
      Returns:
          bool: True if the adapter was added, False otherwise.
      """
      raise NotImplementedError()
  
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 7 for calling the AdapterLayerBase obj's underlying member method code with example usage: obj.add_adapter(adapter_name, layer_idx) without return types