def _get_non_terminals(rhs):
  """Return set of non-terminal symbols in `rhs`."""
  non_terminals = set()
  for symbol in rhs:
    if qcfg_rule.is_nt(symbol):
      non_terminals.add(symbol)
  return non_terminals
Return set of non-terminal symbols in `rhs`.
language/compgen/csl/induction/unification_utils.py