code: def test_draw_triangle_nointerp():
      """Assert that we draw triangles properly, without interpolation enabled."""
      # Isosceles triangle
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 1, 0, 0],
              [0, 1, 1, 1, 0],
              [1, 1, 1, 1, 1],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (0, 4, 0, 3), (0, 0, 0), (agg,), 1)
      np.testing.assert_equal(agg, out)
  
      # Right triangle
      tri = ((2.4, -0.5), (-0.5, 2.4), (2.4, 2.4))
      out = np.array(
          [
              [0, 0, 2, 0, 0],
              [0, 2, 2, 0, 0],
              [2, 2, 2, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (0, 4, 0, 3), (0, 0, 0), (agg,), 2)
      np.testing.assert_equal(agg, out)
  
      # Two right trimesh
      tri = (
          (2.4, -0.5),
          (-0.5, 2.4),
          (2.4, 2.4),
          (2.4, -0.5),
          (2.4, 3.5),
          (4.5, -0.5),
      )
      out = np.array(
          [
              [0, 0, 3, 4, 4],
              [0, 3, 3, 4, 0],
              [3, 3, 3, 4, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri[:3], (0, 4, 0, 3), (0, 0, 0), (agg,), 3)
      draw_triangle(tri[3:], (0, 4, 0, 3), (0, 0, 0), (agg,), 4)
      np.testing.assert_equal(agg, out)
  
      # Draw isoc triangle with clipping
      tri = ((2, -0.5), (-0.5, 2.5), (4.5, 2.5))
      out = np.array(
          [
              [0, 0, 1, 0, 0],
              [0, 1, 1, 1, 0],
              [1, 1, 1, 1, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (0, 3, 0, 2), (0, 0, 0), (agg,), 1)
      np.testing.assert_equal(agg, out)
  
      # clip from right and left
      out = np.array(
          [
              [0, 0, 1, 0, 0],
              [0, 1, 1, 1, 0],
              [0, 1, 1, 1, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (1, 3, 0, 2), (0, 0, 0), (agg,), 1)
      np.testing.assert_equal(agg, out)
  
      # clip from right, left, top
      out = np.array(
          [
              [0, 0, 0, 0, 0],
              [0, 1, 1, 1, 0],
              [0, 1, 1, 1, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (1, 3, 1, 2), (0, 0, 0), (agg,), 1)
      np.testing.assert_equal(agg, out)
  
      # clip from right, left, top, bottom
      out = np.array(
          [
              [0, 0, 0, 0, 0],
              [0, 1, 1, 1, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      agg = np.zeros((4, 5), dtype="i4")
      draw_triangle(tri, (1, 3, 1, 1), (0, 0, 0), (agg,), 1)
      np.testing.assert_equal(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 27 for calling a global function with example usage: test_draw_triangle_nointerp() without return types