class_docstr: In NLTK, a ``ComplexType`` is a function.  These functions are curried, so if you need multiple
  arguments for your function you nest ``ComplexTypes``.  That currying makes things difficult
  for us, and we mitigate the problems by adding ``return_type`` and ``argument_type`` functions
  to ``ComplexType``.
class_docstr_tok: ["In","NLTK",",","a","``","ComplexType","``","is","a","function",".","These","functions","are","curried",",","so","if","you","need","multiple","arguments","for","your","function","you","nest","``","ComplexTypes","``",".","That","currying","makes","things","difficult","for","us",",","and","we","mitigate","the","problems","by","adding","``","return_type","``","and","``","argument_type","``","functions","to","``","ComplexType","``","."]
docstr: Gives the final return type for this function.  If the function takes a single argument,
  this is just ``self.second``.  If the function takes multiple arguments and returns a basic
  type, this should be the final ``.second`` after following all complex types.  That is the
  implementation here in the base class.  If you have a higher-order function that returns a
  function itself, you need to override this method.
code: def return_type(self):
      """
      Gives the final return type for this function.  If the function takes a single argument,
      this is just ``self.second``.  If the function takes multiple arguments and returns a basic
      type, this should be the final ``.second`` after following all complex types.  That is the
      implementation here in the base class.  If you have a higher-order function that returns a
      function itself, you need to override this method.
      """
      return_type = self.second
      while isinstance(return_type, ComplexType):
          return_type = return_type.second
      return return_type
  
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 for calling the ComplexType obj's underlying member method code with example usage: obj.return_type() and returns: return_type