class_docstr: Implements a Luna Encoder Layer used in masked pre-trained language models
  and fine-tuned classication/regression mdoel
class_docstr_tok: ["Implements","a","Luna","Encoder","Layer","used","in","masked","pre-trained","language","models","and","fine-tuned","classication\/regression","mdoel"]
code: def build_self_attention(
      self,
      embed_dim,
      num_attention_heads,
      num_projected_attention_heads,
      dropout,
      tie_kv,
      q_noise,
      qn_block_size,
  ):
      return LunarMultiheadAttention(
          embed_dim,
          num_attention_heads,
          num_projected_attention_heads,
          dropout=dropout,
          self_attention=True,
          tie_kv=tie_kv,
          q_noise=q_noise,
          qn_block_size=qn_block_size,
      )
  
imports: import math
  from typing import Callable, Optional
  import torch
  from fairseq import utils
  from fairseq.modules import LayerDropModuleList, LayerNorm, PositionalEmbedding
  from fairseq.modules.fairseq_dropout import FairseqDropout
  from pytext.utils.usage import log_class_usage
  from torch import nn
  from torch.nn import Parameter
  from .None import LunarMultiheadAttention
label_desc: Use image node_id 4 for calling the LunaSentenceEncoderLayer obj's underlying member method code with example usage: obj.build_self_attention(embed_dim, num_attention_heads, num_projected_attention_heads, dropout, tie_kv, q_noise, qn_block_size) and returns: LunarMultiheadAttention