code: def transpose_for_scores_extended(self, x, attention_heads):
      new_x_shape = x.size()[:-1] + (attention_heads, -1)
      x = x.view(new_x_shape)
      return x.permute(0, 2, 1, 3)
  
file_path: adapters/src/adapters/models/deberta_v2/modeling_deberta_v2.py
imports: import torch
  import torch.utils.checkpoint
  from transformers.models.deberta_v2.modeling_deberta_v2 import DebertaV2Output, DebertaV2SelfOutput, DisentangledSelfAttention, XSoftmax
  from ...composition import adjust_tensors_for_parallel, match_attn_matrices_for_parallel
  from ...utils import prefix_attention_mask
  from ..bert.mixin_bert import BertOutputAdaptersMixin, BertSelfOutputAdaptersMixin
  from .mixin_deberta_v2 import DebertaV2SelfAttentionAdaptersMixin
label_desc: Use image node_id 1 for calling the DisentangledSelfAttentionWithAdapters obj's underlying member method code with example usage: obj.transpose_for_scores_extended(x, attention_heads) and returns: x