code: def get_num_escape_turns(x, y):
      """Returns the number of iterations it took to escape
      as normalized values.
      Parameters
      ----------
  
      x: float
       the x coordinates of the point
  
      y: float
       the y coordinates of the point
  
      Returns
      -------
      float: [0, 1]
      * 0 if it took 0 iterations to escape
      * 1 if did not escape in MAX_ITERATIONS iterations
      * a linearly interpolated number between 0 and 1 if the point took
        anywhere between 0 to MAX_ITERATIONS to escape
  
      """
      c = complex(x, y)
      z = complex(x, y)
  
      num_iterations = 0
  
      while (
          MIN_MAGNITUDE < np.absolute(z) < ESCAPE_MAGNITUDE
          and num_iterations < MAX_ITERATIONS
      ):
          z = (z**2) + c
          num_iterations += 1
  
      return float(num_iterations) / float(MAX_ITERATIONS)
  
file_path: vispy/examples/basics/visuals/colorbar_visual.py
imports: from vispy import app
  from vispy import gloo
  from vispy.visuals.transforms import STTransform
  from vispy.visuals import ColorBarVisual, ImageVisual
  from vispy.color import Color, get_colormap
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: get_num_escape_turns(x, y) and returns: unknown