code: def forward(
      self, hidden_states: torch.Tensor, residual: torch.Tensor
  ) -> torch.Tensor:
      hidden_states = self.act(self.up_proj(hidden_states))
  
      intermediate_output = self.down_proj(hidden_states)
  
      output = F.dropout(
          intermediate_output,
          p=self.hidden_dropout,
          training=self.training,
      )
      output = output + residual
  
      return output
  
imports: import math
  from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, LayerNorm, MSELoss
  from torch.nn import functional
  from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
  from ...modeling_attn_mask_utils import _prepare_4d_causal_attention_mask
  from ...modeling_outputs import BaseModelOutputWithPastAndCrossAttentions, CausalLMOutputWithCrossAttentions, QuestionAnsweringModelOutput, SequenceClassifierOutputWithPast, TokenClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import logging
  from .configuration_mpt import MptConfig
label_desc: Use image node_id 2 for calling the MptMLP obj's underlying member method code with example usage: obj.forward(hidden_states, residual) and returns: output