code: def forward(self, x):
      if len(x.size()) <= 2:
          return self.interpolate(x)
  
      # Squash samples and timesteps into a single axis
      x_reshape = x.contiguous().view(
          -1, x.size(-1)
      )  # (samples * timesteps, input_size)
  
      y = self.interpolate(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
  
imports: import math
  from typing import Dict, List, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the TimeDistributedInterpolation obj's underlying member method code with example usage: obj.forward(x) and returns: y, self