code: def interpolate(self, x):
      upsampled = F.interpolate(
          x.unsqueeze(1),
          self.output_size,
          mode="linear",
          align_corners=True,
      ).squeeze(1)
      if self.trainable:
          upsampled = (
              upsampled * self.gate(self.mask.unsqueeze(0)) * 2.0
          )
      return upsampled
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from darts.logging import get_logger
  from darts.utils.torch import MonteCarloDropout
label_desc: Use image node_id 2 for calling the _TimeDistributedInterpolation obj's underlying member method code with example usage: obj.interpolate(x) and returns: upsampled