code: def test_draw_triangle_interp():
      """Assert that we draw triangles properly, with interpolation enabled."""
      # Isosceles triangle
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 3, 0, 0],
              [0, 3, 3, 3, 0],
              [3, 3, 3, 3, 3],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle_interp(
          tri, (0, 4, 0, 3), (0, 0, 0), (agg,), (3, 3, 3)
      )
      np.testing.assert_equal(agg, out)
  
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 1.25, 0, 0],
              [0, 1.55, 1.75, 1.95, 0],
              [1.85, 2.05, 2.25, 2.45, 2.65],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="f4")
      draw_triangle_interp(
          tri, (0, 4, 0, 2), (0, 0, 0), (agg,), (1, 2, 3)
      )
      np.testing.assert_allclose(agg, out)
  
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 3.75, 0, 0],
              [0, 4.65, 5.25, 5.85, 0],
              [5.55, 6.15, 6.75, 7.35, 7.95],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="f4")
      draw_triangle_interp(
          tri, (0, 4, 0, 2), (0, 0, 0), (agg,), (3, 6, 9)
      )
      np.testing.assert_allclose(agg, out)
  
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 5.5, 0, 0],
              [0, 4.9, 4.5, 4.1, 0],
              [4.3, 3.9, 3.5, 3.1, 2.7],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="f4")
      draw_triangle_interp(
          tri, (0, 4, 0, 2), (0, 0, 0), (agg,), (6, 4, 2)
      )
      np.testing.assert_allclose(agg, out)
  
imports: from __future__ import annotations
  import pandas
  import numpy
  import pytest
  from datashader.datashape import dshape
  from datashader.glyphs import Point, LinesAxis1, Glyph
  from datashader.glyphs.area import _build_draw_trapezoid_y
  from datashader.glyphs.line import _build_map_onto_pixel_for_line, _build_draw_segment, _build_extend_line_axis0
  from datashader.glyphs.trimesh import _build_map_onto_pixel_for_triangle, _build_draw_triangle, _build_extend_triangles
  from datashader.utils import ngjit
label_desc: Use image node_id 28 for calling a global function with example usage: test_draw_triangle_interp() without return types