code: def compute_scale(isize, osize, align_corners):
      if osize > 1:
          return (
              (isize - 1) / (osize - 1)
              if align_corners
              else isize / osize
          )
      else:
          return 0.0
  
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 1 for calling a global function with example usage: compute_scale(isize, osize, align_corners) and returns: unknown, int