def _get_non_terminals(rhs):
  """Return set of non-terminal symbols in `rhs`."""
  non_terminals = set()
  for symbol in rhs:
    if symbol in (qcfg_rule.NT_1, qcfg_rule.NT_2, NT_TMP):
      non_terminals.add(symbol)
  return non_terminals
Return set of non-terminal symbols in `rhs`.
language/compgen/nqg/model/induction/split_utils.py