code: def build_scale_translate(out_size, out0, out1, src_size, src0, src1):
      translate_y = src_size * (out0 - src0) / (src1 - src0)
      scale_y = (src_size * (out1 - out0)) / (out_size * (src1 - src0))
      return scale_y, translate_y
  
imports: import math
  from toolz import memoize
  import numpy
  from datashader.glyphs.glyph import Glyph
  from datashader.resampling import infer_interval_breaks
  from datashader.utils import isreal, ngjit, ngjit_parallel
  import numba
  from numba import cuda, prange
label_desc: Use image node_id 2 for calling a global function with example usage: build_scale_translate(out_size, out0, out1, src_size, src0, src1) and returns: scale_y,  translate_y