code: def forward(
      ctx,
      is_training,
      heads,
      inputs,
      pad_mask,
      mask_additive,
      dropout_prob,
  ):
      heads_t = torch.tensor([heads])
      dropout_prob_t = torch.tensor([dropout_prob])
      null_tensor = torch.tensor([])
      use_mask = pad_mask is not None
      use_mask_t = torch.tensor([use_mask])
      mask_additive_t = torch.tensor([mask_additive])
  
      if mask_additive:
          (
              dropout_results,
              dropout_mask,
              softmax_results,
          ) = fast_multihead_attn.additive_mask_softmax_dropout_forward(
              use_mask,
              is_training,
              heads,
              inputs,
              pad_mask if use_mask else null_tensor,
              dropout_prob,
          )
          # fast_additive_mask_softmax_dropout.forward(                           \
      else:
          (
              dropout_results,
              dropout_mask,
              softmax_results,
          ) = fast_multihead_attn.mask_softmax_dropout_forward(
              use_mask,
              is_training,
              heads,
              inputs,
              pad_mask if use_mask else null_tensor,
              dropout_prob,
          )
          # fast_mask_softmax_dropout.forward(                           \
  
      ctx.save_for_backward(
          use_mask_t,
          heads_t,
          softmax_results,
          dropout_mask,
          pad_mask if use_mask else null_tensor,
          mask_additive_t,
          dropout_prob_t,
      )
  
      return dropout_results.detach()
  
imports: import torch
  import fast_multihead_attn
label_desc: Use image node_id 1 for calling the MaskSoftmaxDropout obj's underlying member method code with example usage: obj.forward(ctx, is_training, heads, inputs, pad_mask, mask_additive, dropout_prob) and returns: dropout_results