class_docstr: A higher-order function is a ``ComplexType`` that returns functions.  We just override
  ``return_type`` and ``argument_types`` to make sure that these types are correct.
  
  Parameters
  ----------
  num_arguments : ``int``
      How many arguments this function takes before returning a function.  We'll go through this
      many levels of nested ``ComplexTypes`` before returning the final ``.second`` as our return
      type.
  first : ``Type``
      Passed to NLTK's ComplexType.
  second : ``Type``
      Passed to NLTK's ComplexType.
class_docstr_tok: ["A","higher-order","function","is","a","``","ComplexType","``","that","returns","functions",".","We","just","override","``","return_type","``","and","``","argument_types","``","to","make","sure","that","these","types","are","correct",".","Parameters","--","--","--","--","--","num_arguments",":","``","int","``","How","many","arguments","this","function","takes","before","returning","a","function",".","We","'ll","go","through","this","many","levels","of","nested","``","ComplexTypes","``","before","returning","the","final","``",".second","``","as","our","return","type",".","first",":","``","Type","``","Passed","to","NLTK","'s","ComplexType",".","second",":","``","Type","``","Passed","to","NLTK","'s","ComplexType","."]
code: def __init__(self, num_arguments, first, second):
      super(HigherOrderType, self).__init__(first, second)
      self.num_arguments = num_arguments
  
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 1 to create a new HigherOrderType object from inherited base classes: ComplexType with example: obj = HigherOrderType(num_arguments, first, second)