code: def pre_block(
      self,
      adapter_setup: Union[AdapterCompositionBlock, str],
      state: BottleneckState,
  ) -> BottleneckState:
      if isinstance(adapter_setup, AdapterCompositionBlock):
          adapter_name = adapter_setup.first()
      else:
          adapter_name = adapter_setup
      first_adapter = self.adapters[adapter_name]
      hidden_states, _, residual = first_adapter.pre_forward(
          state.hidden_states, state.input_tensor, state.layer_norm
      )
  
      return state._replace(
          hidden_states=hidden_states, adapter_residual=residual
      )
  
imports: from typing import Dict, List, Mapping, NamedTuple, Optional, Union
  import torch
  from torch import nn
  from ..composition import AdapterCompositionBlock, Average, BatchSplit, Fuse, Parallel, Split, Stack, adjust_tensors_for_parallel
  from ..configuration import BnConfig
  from ..context import ForwardContext
  from .adapter_layer_base import ComposableAdapterLayerBase
  from .modeling import Adapter, BertFusion, ParallelAdapter
label_desc: Use image node_id 11 for calling the BottleneckLayer obj's underlying member method code with example usage: obj.pre_block(adapter_setup, state) and returns: state