code: def _generate_random_line_positions(num_points, dtype=np.float32):
      rng = np.random.default_rng()
      pos = np.empty((num_points, 2), dtype=np.float32)
      pos[:, 0] = np.arange(num_points)
      pos[:, 1] = rng.random((num_points,), dtype=dtype)
      return pos
  
imports: import time
  from math import sin, pi
  import numpy
  from PyQt5 import QtWidgets, QtCore
  from vispy.scene import SceneCanvas, visuals
  from vispy.app import use_app, Timer
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_random_line_positions(num_points, dtype) and returns: pos