code: def get_source_index(scale, dst_index, half_pixel):
      return (
          np.maximum(0, scale * (dst_index + 0.5) - 0.5)
          if half_pixel
          else scale * dst_index
      )
  
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 3 for calling a global function with example usage: get_source_index(scale, dst_index, half_pixel) and returns: unknown