code: def forward(
      self, x: Tensor, output_size: Union[Tuple[int, int], torch.Size]
  ) -> Tensor:
      return nn.functional.interpolate(
          x, size=output_size, mode="nearest"
      )
  
imports: from enum import Enum
  from math import hypot
  from typing import Optional, List, Tuple, Union, Type
  import torch
  from torch import nn, Tensor
label_desc: Use image node_id 2 for calling the NearestNeighborResizeLayer obj's underlying member method code with example usage: obj.forward(x, output_size) and returns: nn