class_docstr: Implementation of a parallel bottleneck adapter block.
docstr: Retrieves the hidden_states, query (for Fusion), and residual connection according to the set configuration.
  
  Args:
      adapter_config: config file according to what the parameters are passed
      hidden_states: output of previous layer
      input_tensor: residual connection before FFN
  
  Returns: hidden_states, query, residual
docstr_tok: ["Retrieves","the","hidden_states",",","query","(","for","Fusion",")",",","and","residual","connection","according","to","the","set","configuration",".","Args",":","adapter_config",":","config","file","according","to","what","the","parameters","are","passed","hidden_states",":","output","of","previous","layer","input_tensor",":","residual","connection","before","FFN","Returns",":","hidden_states",",","query",",","residual"]
code: def pre_forward(
      self,
      hidden_states,
      input_tensor,
      layer_norm,
      fusion_config=None,
  ):
      """
      Retrieves the hidden_states, query (for Fusion), and residual connection according to the set configuration.
  
      Args:
          adapter_config: config file according to what the parameters are passed
          hidden_states: output of previous layer
          input_tensor: residual connection before FFN
  
      Returns: hidden_states, query, residual
  
      """
      # In case of parallel adapter, return the input tensor as hidden states
      query = None
      if fusion_config is not None:
          query = input_tensor
      return input_tensor, query, input_tensor
  
imports: import math
  import torch
  from torch import nn
  from transformers.activations import get_activation
  from ..configuration import AdapterFusionConfig, BnConfig
  from ..context import ForwardContext
label_desc: Use image node_id 2 for calling the ParallelAdapter obj's underlying member method code with example usage: obj.pre_forward(hidden_states, input_tensor, layer_norm, fusion_config) and returns: input_tensor,  query,  input_tensor