code: def _allowed_transition_names_and_token_types(self):
      def iterate():
          # An API just for Jedi.
          for stack_node in reversed(self):
              for transition in stack_node.dfa.transitions:
                  if isinstance(transition, ReservedString):
                      yield transition.value
                  else:
                      yield transition  # A token type
  
              if not stack_node.dfa.is_final:
                  break
  
      return list(iterate())
  
imports: from parso import tree
  from parso.pgen2.generator import ReservedString
label_desc: Use image node_id 1 for calling the Stack obj's underlying member method code with example usage: obj._allowed_transition_names_and_token_types() and returns: list