code: def forward(self, x):
      x = torch.nn.functional.interpolate(
          x, scale_factor=2.0, mode="nearest"
      )
      if self.with_conv:
          x = self.conv(x)
      return x
  
imports: import logging
  import math
  from typing import Any, Callable, Optional
  import numpy
  import torch
  import torch.nn
  from einops import rearrange
  from packaging import version
  from ...modules.attention import LinearAttention, MemoryEfficientCrossAttention
label_desc: Use image node_id 2 for calling the Upsample obj's underlying member method code with example usage: obj.forward(x) and returns: x