code: def is_nonterminal(production):
      # TODO(pradeep): This is pretty specific to the assumptions made in converting types to
      # strings (e.g., that we're only using the first letter for types, lowercased).
      # TODO(pradeep): Also we simply check the surface forms here, and this works for
      # wikitables and nlvr. We should ideally let the individual type declarations define their own
      # variants of this method.
      if production in ["<=", "<"]:
          # Some grammars (including the wikitables grammar) have "less than" and "less than or
          # equal to" functions that are terminals.  We don't want to treat those like our
          # "<t,d>" types.
          return False
      if production[0] == "<":
          return True
      if production.startswith("fb:"):
          return False
      if len(production) > 1 or production in LAMBDA_VARIABLES:
          return False
      return production[0].islower()
  
imports: from __future__ import absolute_import
  from collections import defaultdict
  from nltk.sem.logic import Expression, ApplicationExpression, ConstantExpression, LogicParser, Variable
  from nltk.sem.logic import Type, BasicType, ComplexType, ANY_TYPE
  from allennlp.common.util import START_SYMBOL
label_desc: Use image node_id 5 for calling a global function with example usage: is_nonterminal(production) and returns: production, False, True, False, False