code: def __init__(
      self,
      d_model,
      n_head,
      d_qkv,
      attention_dropout=0.1,
      initializer_range=0.02,
  ):
      super().__init__()
  
      self.w_qkv_c = nn.Parameter(
          torch.Tensor(n_head, d_model // 2, 3, d_qkv // 2)
      )
      self.w_qkv_p = nn.Parameter(
          torch.Tensor(n_head, d_model // 2, 3, d_qkv // 2)
      )
      self.w_o_c = nn.Parameter(
          torch.Tensor(n_head, d_qkv // 2, d_model // 2)
      )
      self.w_o_p = nn.Parameter(
          torch.Tensor(n_head, d_qkv // 2, d_model // 2)
      )
  
      bound = math.sqrt(3.0) * initializer_range
      for param in [self.w_qkv_c, self.w_qkv_p, self.w_o_c, self.w_o_p]:
          nn.init.uniform_(param, -bound, bound)
      self.scaling_factor = 1 / d_qkv**0.5
  
      self.dropout = nn.Dropout(attention_dropout)
  
imports: import copy
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  from stanza.models.constituency.positional_encoding import ConcatSinusoidalEncoding
label_desc: Use image node_id 1 to create a new PartitionedMultiHeadAttention object from inherited base classes: nn with example: obj = PartitionedMultiHeadAttention(d_model, n_head, d_qkv, attention_dropout, initializer_range)