code: def forward(self, x):
      if len(x.size()) <= 2:
          return super().forward(x)
  
      # Squash samples and timesteps into a single axis
      x_reshape = x.contiguous().view(
          -1, x.size(-1)
      )  # (samples * timesteps, input_size)
  
      y = super().forward(x_reshape)
  
      # We have to reshape Y
      if self.batch_first:
          y = y.contiguous().view(
              x.size(0), -1, y.size(-1)
          )  # (samples, timesteps, output_size)
      else:
          y = y.view(
              -1, x.size(1), y.size(-1)
          )  # (timesteps, samples, output_size)
      return y
  
file_path: pytorch-forecasting/pytorch_forecasting/models/nn/embeddings.py
imports: from typing import Dict, List, Tuple, Union
  import torch
  import torch.nn
  from pytorch_forecasting.utils import get_embedding_size
label_desc: Use image node_id 2 for calling the TimeDistributedEmbeddingBag obj's underlying member method code with example usage: obj.forward(x) and returns: y, super