def _get_node_string(node):
  """Return string for RHS of node with non-terminals anonymized."""
  rhs = node.rhs
  tokens = rhs.split()
  new_tokens = []
  # Anonymize non-terminals.
  for token in tokens:
    if token.startswith("##"):
      new_tokens.append(_PLACEHOLDER)
    else:
      new_tokens.append(token)
  return " ".join(new_tokens)
Return string for RHS of node with non-terminals anonymized.
language/compgen/nqg/tasks/spider/tmcd_utils.py