code: def _build_map_onto_pixel_for_triangle(x_mapper, y_mapper):
      @ngjit
      def map_onto_pixel(vt, bounds, x, y):
          """Map points onto pixel grid."""
          # Do not snap to pixel centers
          sx, tx, sy, ty = vt
          xx = x_mapper(x) * sx + tx - 0.5
          yy = y_mapper(y) * sy + ty - 0.5
          return xx, yy
  
      return map_onto_pixel
  
imports: from __future__ import annotations
  from math import floor
  import numpy
  from toolz import memoize
  from datashader.glyphs.points import _PointLike
  from datashader.utils import isreal, ngjit
label_desc: Use image node_id 3 for calling a global function with example usage: _build_map_onto_pixel_for_triangle(x_mapper, y_mapper) and returns: map_onto_pixel, xx,  yy