code: def _get_index(n_items, item_size, n):
      
      index = np.arange(n_items)
      index = np.repeat(index, item_size)
      index = index.astype(np.float64)
      assert index.shape == (n,)
      return index
docs: Prepare an index attribute for GPU uploading.