code: def record_action(tree_dict: Dict, state: str, action: str):
      """Record the action in the tree dictionary.
  
      Args:
          tree_dict (Dict): The tree dictionary.
          state (str): The state as a hash string.
          action (str): The action as a hash string.
      """
      if state in tree_dict:
          tree_dict[state].append(action)
      else:
          tree_dict[state] = [action]
  
file_path: nebuly/optimization/open_alpha_tensor/open_alpha_tensor/core/actors/stage.py
imports: from typing import Dict, List
  import torch
  from open_alpha_tensor.core.data.utils import get_scalars, map_action_to_triplet
  from open_alpha_tensor.core.modules.alpha_tensor import AlphaTensorModel
label_desc: Use image node_id 9 for calling a global function with example usage: record_action(tree_dict, state, action) without return types