code: def type_inference(self):
      if self.x.rank < 3:
          raise ValueError(
              'input to the "upsample_nearest_neighbor" op must have rank at least 3'
          )
  
      ret_shape = list(self.x.shape)
      ret_shape[-1] *= self.upscale_factor_width.val
      ret_shape[-2] *= self.upscale_factor_height.val
      return types.tensor(self.x.dtype, ret_shape)
  
imports: from ._op_reqs import *
label_desc: Use image node_id 2 for calling the upsample_nearest_neighbor obj's underlying member method code with example usage: obj.type_inference() and returns: types