class_docstr: Dataset to be used for training the AlphaTensor algorithm using both
  actor generated and synthetic data. A basis change can be applied to both
  the data type with a probability specified in the constructor. The
  synthetic data and the actor generated one are stored in two data buffers.
code: def recompute_synthetic_indexes(self):
      if len(self.game_data_buffer) > 0:
          self.synth_bool = torch.rand(self.len_data) < self.pct_synth
          len_synth_data = self.synth_bool.sum().item()
          self.synth_idx = torch.from_numpy(
              np.random.choice(
                  len(self.synthetic_data_buffer),
                  len_synth_data,
                  replace=False,
              )
          )
          if (
              len(self.best_game_data_buffer) > 0
              and self.pct_best_game > 0
          ):
              len_game_data = int(
                  (1 - self.pct_synth - self.pct_best_game)
                  * self.len_data
              )
              replace_game = len_game_data > len(self.game_data_buffer)
              len_best_game_data = (
                  self.len_data - len_synth_data - len_game_data
              )
              replace_best_game = len_best_game_data > len(
                  self.best_game_data_buffer
              )
              self.game_idx = torch.from_numpy(
                  np.random.choice(
                      len(self.game_data_buffer),
                      len_game_data,
                      replace=replace_game,
                  )
              )
              self.best_game_idx = torch.from_numpy(
                  np.random.choice(
                      len(self.best_game_data_buffer),
                      len_best_game_data,
                      replace=replace_best_game,
                  )
              )
          else:
              len_game_data = self.len_data - len_synth_data
              replace_game = len_game_data > len(self.game_data_buffer)
              self.game_idx = torch.from_numpy(
                  np.random.choice(
                      len(self.game_data_buffer),
                      len_game_data,
                      replace=replace_game,
                  )
              )
  
imports: import json
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from typing import List, Tuple
  import numpy
  import torch
  from torch.utils.data import Dataset
  from open_alpha_tensor.core.data.generation import generate_synthetic_data
  from open_alpha_tensor.core.data.utils import get_scalars, map_triplet_to_action
label_desc: Use image node_id 3 for calling the TensorGameDataset obj's underlying member method code with example usage: obj.recompute_synthetic_indexes() without return types