code: def tree_from_tokens_and_indx_actions(
      token_str_list: List[str],
      actions_vocab: List[str],
      actions_indices: List[int],
      validate_tree: bool = True,
  ):
      builder = TreeBuilder()
      i = 0
      try:
          for action_idx in actions_indices:
              action = actions_vocab[action_idx]
              if action == REDUCE:
                  builder.update_tree(action, None)
              elif action == SHIFT:
                  builder.update_tree(action, token_str_list[i])
                  i += 1
              else:
                  builder.update_tree(action, action)
  
      except IndexError:
          builder = TreeBuilder()
          builder.update_tree(SHIFT, "IN:INVALID")
      tree = builder.finalize_tree(validate_tree=validate_tree)
      return tree
  
imports: from typing import Dict, List, Set, Union
  from pytext.common.constants import BatchContext, DatasetFieldName, Stage
  from pytext.data import CommonMetadata
  from pytext.data.data_structures.annotation import Intent, REDUCE, SHIFT, Slot, Token, Tree, TreeBuilder
  from pytext.data.tensorizers import Tensorizer
  from pytext.data.tokenizers import Tokenizer
  from pytext.metrics.intent_slot_metrics import compute_all_metrics, FramePredictionPair, Node, Span
  from .channel import Channel, ConsoleChannel, FileChannel
  from .metric_reporter import MetricReporter
label_desc: Use image node_id 11 for calling the CompositionalMetricReporter obj's underlying member method code with example usage: obj.tree_from_tokens_and_indx_actions(token_str_list, actions_vocab, actions_indices, validate_tree) and returns: tree