code: def compute_color(mag_a, mag_i, mag_z, a_crit=-0.1):
      """
      Compute the scatter-plot color using code adapted from
      TCL source used in Parker 2008.
      """
      # define the base color scalings
      R = np.ones_like(mag_i)
      G = 0.5 * 10 ** (-2 * (mag_i - mag_z - 0.01))
      B = 1.5 * 10 ** (-8 * (mag_a + 0.0))
  
      # enhance green beyond the a_crit cutoff
      i = np.where(mag_a < a_crit)
      G[i] += 10000 * (10 ** (-0.01 * (mag_a[i] - a_crit)) - 1)
  
      # normalize color of each point to its maximum component
      RGB = np.vstack([R, G, B])
      RGB /= RGB.max(0)
  
      # return an array of RGB colors, which is shape (n_points, 3)
      return RGB.T
  
imports: import numpy
  import matplotlib
  from matplotlib import pyplot
  from astroML.datasets import fetch_moving_objects
  from astroML.plotting.tools import devectorize_axes
label_desc: Use image node_id 2 for calling a global function with example usage: compute_color(mag_a, mag_i, mag_z, a_crit) and returns: RGB