class_docstr: Applies preprocessing to input and then computes negative sampling.
  
  Args:
      preprocessor (nn.Module): Transforms input tensor prior to negative sampling.
      num_negatives (int): Number of negative examples to sample.
      cross_sample_negatives (int): Number of negative examples to cross sample.
docstr: Args:
      input (Tensor): Tensor of dimension `(B, T, D)`.
  
  Returns:
      (Tensor, Tensor, Optional[Tensor]):
      Tensor
          The input tensor after preprocessing, prior to being sampled.
      Tensor
          The negative samples.
      Tensor
          The indices of the negative samples.
docstr_tok: ["Args",":","input","(","Tensor",")",":","Tensor","of","dimension","`","(","B",",","T",",","D",")","`",".","Returns",":","(","Tensor",",","Tensor",",","Optional","[","Tensor","]",")",":","Tensor","The","input","tensor","after","preprocessing",",","prior","to","being","sampled",".","Tensor","The","negative","samples",".","Tensor","The","indices","of","the","negative","samples","."]
code: def forward(
      self, input: Tensor
  ) -> Tuple[Tensor, Tensor, Optional[Tensor]]:
      """
      Args:
          input (Tensor): Tensor of dimension `(B, T, D)`.
  
      Returns:
          (Tensor, Tensor, Optional[Tensor]):
          Tensor
              The input tensor after preprocessing, prior to being sampled.
          Tensor
              The negative samples.
          Tensor
              The indices of the negative samples.
      """
      preprocessed = self.preprocessor(input)
      negs, neg_idxs = _sample_negatives(
          preprocessed, self.num_negatives, self.cross_sample_negatives
      )
      return preprocessed, negs, neg_idxs
  
imports: from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn, Tensor
  from torch.nn import Module, ModuleList
  from torchaudio.models import Wav2Vec2Model
  from torchaudio.models.conformer import ConformerLayer
  from torchaudio.models.rnnt import _TimeReduction
  from torchaudio.models.wav2vec2 import components
label_desc: Use image node_id 2 for calling the NegativeSampler obj's underlying member method code with example usage: obj.forward(input) and returns: preprocessed,  negs,  neg_idxs