code: def test_pad_input():
      """Test `match_template` when `pad_input=True`.
  
      This test places two full templates (one with values lower than the image
      mean, the other higher) and two half templates, which are on the edges of
      the image. The two full templates should score the top (positive and
      negative) matches and the centers of the half templates should score 2nd.
      """
      # Float prefactors ensure that image range is between 0 and 1
      template = 0.5 * diamond(2)
      image = 0.5 * np.ones((9, 19))
      mid = slice(2, 7)
      image[mid, :3] -= template[
          :, -3:
      ]  # half min template centered at 0
      image[mid, 4:9] += template  # full max template centered at 6
      image[mid, -9:-4] -= template  # full min template centered at 12
      image[mid, -3:] += template[
          :, :3
      ]  # half max template centered at 18
  
      result = match_template(
          image, template, pad_input=True, constant_values=image.mean()
      )
  
      # get the max and min results.
      sorted_result = np.argsort(result.flat)
      i, j = np.unravel_index(sorted_result[:2], result.shape)
      assert_equal(j, (12, 0))
      i, j = np.unravel_index(sorted_result[-2:], result.shape)
      assert_equal(j, (18, 6))
  
file_path: scikit-image/skimage/feature/tests/test_template.py
imports: import numpy
  from skimage._shared.testing import assert_almost_equal, assert_equal
  from skimage import data, img_as_float
  from skimage.morphology import diamond
  from skimage.feature import match_template, peak_local_max
  from skimage._shared import testing
label_desc: Use image node_id 5 for calling a global function with example usage: test_pad_input() without return types