def _term_type_from_action_sequence(action_sequence):
      """Get the term_type from a step action sequence."""
      for action in action_sequence:
        lhs = str(self.productions()[action].lhs())
        if lhs in ['_Wa_', '_Wt_', '_Wq_', '_Wd_']:
          return lhs
      return None
Get the term_type from a step action sequence.
language/search_agents/muzero/state_tree.py