code: def compute_scale_for_nn(
      isize, osize, align_corners, half_pixel_for_nn
  ):
      if half_pixel_for_nn:
          return isize / float(osize)
      else:
          return compute_scale(isize, osize, align_corners)
  
imports: from __future__ import division
  import pytest
  import numpy
  import nnabla.functions
  import refs
  from nbla_test_utils import list_context
label_desc: Use image node_id 2 for calling a global function with example usage: compute_scale_for_nn(isize, osize, align_corners, half_pixel_for_nn) and returns: unknown, compute_scale