class_docstr: ReverseType is a kind of ``PlaceholderType`` where type resolution involves matching the return
  type with the reverse of the argument type. So all we care about are the types of the surrounding
  expressions, and return a resolution that matches whatever parts are present in the type signatures
  of the arguments and the return expressions.
  
  Following are the resolutions for some example type signatures being matched against::
  
      <?, <e,r>>      :   <<r,e>, <e,r>>
      <<r,?>, <e,?>>  :   <<r,e>, <e,r>>
      <<r,?>, ?>      :   <<r,?>, <?,r>>>
      <<r,?>, <?,e>>  :   None
code: def substitute_any_type(self, basic_types):
      basic_first_types = (
          basic_types
          if self.first.first == ANY_TYPE
          else set([self.first.first])
      )
      basic_second_types = (
          basic_types
          if self.first.second == ANY_TYPE
          else set([self.first.second])
      )
      substitutions = []
      for first_type in basic_first_types:
          for second_type in basic_second_types:
              substituted_first = ComplexType(first_type, second_type)
              substituted_second = ComplexType(second_type, first_type)
              substitutions.append(
                  ReverseType(substituted_first, substituted_second)
              )
      return substitutions
  
imports: from __future__ import absolute_import
  from nltk.sem.logic import Type, BasicType, ANY_TYPE, ComplexType
  from allennlp.semparse.type_declarations.type_declaration import ComplexType, HigherOrderType
  from allennlp.semparse.type_declarations.type_declaration import PlaceholderType, NamedBasicType
  from allennlp.semparse.type_declarations.type_declaration import UnaryOpType, BinaryOpType
label_desc: Use image node_id 4 for calling the ReverseType obj's underlying member method code with example usage: obj.substitute_any_type(basic_types) and returns: substitutions