code: def _density(k, m, dmin, dmax, lmin, lmax):
      r = (k - 1.0) / (lmax - lmin)
      rt = (m - 1.0) / (max(lmax, dmax) - min(lmin, dmin))
      return 2 - max(r / rt, rt / r)
  
imports: import math
  import numpy
  from .visual import CompoundVisual, updating_property
  from .line import LineVisual
  from .text import TextVisual
label_desc: Use image node_id 4 for calling a global function with example usage: _density(k, m, dmin, dmax, lmin, lmax) and returns: unknown