code: def test_bilinearly_sampled_image():
      h, w = 2, 3
      img = np.float32(np.arange(6).reshape(h, w, 1))
      img = img[::-1]  # flip y to match OpenGL
      tests = [
          [0, 0, 0],
          [1, 1, 4],
          [0.5, 0.5, 2],
          [0.5, 0.0, 0.5],
          [0.0, 0.5, 1.5],
          [-1.0, -1.0, 5.0],
          [w, 1, 3.0],
          [w - 0.5, h - 0.5, 2.5],
          [2 * w - 0.5, 2 * h - 0.5, 2.5],
      ]
      tests = np.float32(tests)
      uv = np.float32((tests[:, :2] + 0.5) / [w, h])  # normalize UVs
      expected = tests[:, 2:]
  
      with tf.Session() as sess:
          (output,) = sess.run([bilinearly_sampled_image(img, uv)])
          assert np.abs(output - expected).max() < 1e-8
  
file_path: lucid/tests/optvis/param/test_spatial.py
imports: from __future__ import absolute_import, division, print_function
  import pytest
  import numpy
  import tensorflow
  from lucid.misc.io import load
  from lucid.optvis.param.color import to_valid_rgb
  from lucid.optvis.param.spatial import pixel_image, fft_image, laplacian_pyramid_image, bilinearly_sampled_image
label_desc: Use image node_id 3 for calling a global function with example usage: test_bilinearly_sampled_image() without return types