class_docstr: Dataset of synthetically generated demonstrations.
docstr: Given an initial state and a list of moves, applies the moves to
  the state.
  
  Args:
      tensor (torch.Tensor): Initial state.
      moves (List[Tuple[torch.Tensor, torch.Tensor, torch.Tensor]]):
      List of moves.
docstr_tok: ["Given","an","initial","state","and","a","list","of","moves",",","applies","the","moves","to","the","state",".","Args",":","tensor","(","torch.Tensor",")",":","Initial","state",".","moves","(","List","[","Tuple","[","torch.Tensor",",","torch.Tensor",",","torch.Tensor","]","]",")",":","List","of","moves","."]
code: def _apply_moves(
      tensor: torch.Tensor,
      moves: List[Tuple[torch.Tensor, torch.Tensor, torch.Tensor]],
  ):
      """Given an initial state and a list of moves, applies the moves to
      the state.
  
      Args:
          tensor (torch.Tensor): Initial state.
          moves (List[Tuple[torch.Tensor, torch.Tensor, torch.Tensor]]):
          List of moves.
      """
      for u, v, w in moves:
          tensor = tensor - u.reshape(-1, 1, 1) * v.reshape(
              1, -1, 1
          ) * w.reshape(1, 1, -1)
      return tensor
  
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 4 for calling the SyntheticDataBuffer obj's underlying member method code with example usage: obj._apply_moves(tensor, moves) and returns: tensor