code: def _generate_stars(self):
      # Get number of stars in each block
      blocksize = N // NBLOCKS
  
      # Update active block
      self._active_block += 1
      if self._active_block >= NBLOCKS:
          self._active_block = 0
  
      # Create new position data for the active block
      pos = np.zeros((blocksize, 3), "float32")
      pos[:, :2] = np.random.normal(
          0.0, SIZE / 2.0, (blocksize, 2)
      )  # x-y
      pos[:, 2] = np.random.uniform(0, SIZE, (blocksize,))  # z
      start_index = self._active_block * blocksize
      self.program["a_position"].set_subdata(pos, offset=start_index)
  
      # print(start_index)
  
      # Set offsets - active block gets offset 0
      for i in range(NBLOCKS):
          val = i - self._active_block
          if val < 0:
              val += NBLOCKS
          values = np.ones((blocksize, 1), "float32") * val * SIZE
          start_index = i * blocksize
          self.program["a_offset"].set_subdata(
              values, offset=start_index
          )
  
      # Reset timer
      self._timeout += SPEED
  
file_path: vispy/examples/demo/gloo/spacy.py
imports: import time
  import numpy
  from vispy import gloo
  from vispy import app
  from vispy.util.transforms import perspective
label_desc: Use image node_id 7 for calling the Canvas obj's underlying member method code with example usage: obj._generate_stars() without return types