class_docstr: Multi-headed attention.
  
  See "Attention Is All You Need" for more details.
class_docstr_tok: ["Multi-headed","attention",".","See","``","Attention","Is","All","You","Need","''","for","more","details","."]
code: def apply_sparse_mask(
      self,
      attn_weights: torch.Tensor,
      tgt_len: int,
      src_len: int,
      bsz: int,
  ) -> torch.Tensor:
      return attn_weights
  
imports: import math
  from typing import Iterable, Iterator, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutputWithNoAttention, SequenceClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_graphormer import GraphormerConfig
label_desc: Use image node_id 4 for calling the GraphormerMultiheadAttention obj's underlying member method code with example usage: obj.apply_sparse_mask(attn_weights, tgt_len, src_len, bsz) and returns: attn_weights