code: def get_valid_actions(self) -> List[Dict[str, Tuple[torch.Tensor, torch.Tensor, List[int]]]]:
          
          return [state.get_valid_actions() for state in self.grammar_state]
docs: Returns a list of valid actions for each element of the group.