code: def get_src_findex_by_pad(s, S, padding_mode, align_corners):
      if padding_mode == "zero":
          return get_src_findex_with_zero_pad(s, S)
      elif padding_mode == "reflect":
          if align_corners:
              return get_src_findex_with_reflect_pad(s, S, True)
          else:
              sf = get_src_findex_with_reflect_pad(s, S, False)
              return get_src_findex_with_repeat_pad(sf, S)
      elif padding_mode == "repeat":
          return get_src_findex_with_repeat_pad(s, S)
  
imports: import pytest
  import numpy
  import nnabla
  import nnabla.functions
  from nbla_test_utils import list_context
  from refs import generate_transformation_2d, generate_transformation_3d, affine_grid_2d, affine_grid_3d, ChannelLastToFirstTranspose
  from itertools import product
label_desc: Use image node_id 3 for calling a global function with example usage: get_src_findex_by_pad(s, S, padding_mode, align_corners) and returns: get_src_findex_with_zero_pad, get_src_findex_with_reflect_pad, get_src_findex_with_repeat_pad, get_src_findex_with_repeat_pad