code: def _upsample_flops_compute(
      input,
      size=None,
      scale_factor=None,
      mode="nearest",
      align_corners=None,
  ):
      if size is not None:
          if isinstance(size, tuple):
              return int(_prod(size)), 0
          else:
              return int(size), 0
      assert (
          scale_factor is not None
      ), "either size or scale_factor should be defined"
      flops = input.numel()
      if isinstance(scale_factor, tuple) and len(scale_factor) == len(
          input
      ):
          flops * int(_prod(scale_factor))
      else:
          flops * scale_factor ** len(input)
      return flops, 0
  
imports: import time
  import torch
  import torch.nn
  import torch.nn.functional
  from functools import partial
  from typing import List, Optional
  from collections import OrderedDict
  import numpy
label_desc: Use image node_id 17 for calling a global function with example usage: _upsample_flops_compute(input, size, scale_factor, mode, align_corners) and returns: flops,  int, int,  int, int,  int