class_docstr: Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
class_docstr_tok: ["Drop","paths","(","Stochastic","Depth",")","per","sample","(","when","applied","in","main","path","of","residual","blocks",")","."]
code: def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
      return drop_path(hidden_states, self.drop_prob, self.training)
  
imports: import collections
  from typing import Optional, Tuple, Union
  import torch
  import torch.nn.functional
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutput, ImageClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_timesformer import TimesformerConfig
label_desc: Use image node_id 2 for calling the TimeSformerDropPath obj's underlying member method code with example usage: obj.forward(hidden_states) and returns: drop_path