class_docstr: ``UnaryOpType`` is a kind of ``PlaceholderType`` that takes an argument of any type and returns
  an expression of the same type.  ``identity`` is an example of this kind of function.  The type
  signature of ``UnaryOpType`` is <#1, #1>.
  
  Parameters
  ----------
  allowed_substitutions : ``Set[BasicType]``, optional (default=None)
      If given, this sets restrictions on the types that can be substituted.  That is, say you
      have a unary operation that is only permitted for numbers and dates, you can pass those in
      here, and we will only consider those types when calling :func:`substitute_any_type`.  If
      this is ``None``, all basic types are allowed.
  signature : ``str``, optional (default='<#1,#1>')
      The signature of the operation is what will appear in action sequences that include this
      type.  The default value is suitable for functions that apply to any type.  If you have a
      restricted set of allowed substitutions, you likely want to change the type signature to
      reflect that.
class_docstr_tok: ["``","UnaryOpType","``","is","a","kind","of","``","PlaceholderType","``","that","takes","an","argument","of","any","type","and","returns","an","expression","of","the","same","type",".","``","identity","``","is","an","example","of","this","kind","of","function",".","The","type","signature","of","``","UnaryOpType","``","is","<","#","1",",","#","1",">",".","Parameters","--","--","--","--","--","allowed_substitutions",":","``","Set","[","BasicType","]","``",",","optional","(","default=None",")","If","given",",","this","sets","restrictions","on","the","types","that","can","be","substituted",".","That","is",",","say","you","have","a","unary","operation","that","is","only","permitted","for","numbers","and","dates",",","you","can","pass","those","in","here",",","and","we","will","only","consider","those","types","when","calling",":","func",":","`","substitute_any_type","`",".","If","this","is","``","None","``",",","all","basic","types","are","allowed",".","signature",":","``","str","``",",","optional","(","default=","'","<","#","1",",","#","1",">","'",")","The","signature","of","the","operation","is","what","will","appear","in","action","sequences","that","include","this","type",".","The","default","value","is","suitable","for","functions","that","apply","to","any","type",".","If","you","have","a","restricted","set","of","allowed","substitutions",",","you","likely","want","to","change","the","type","signature","to","reflect","that","."]
docstr: See ``PlaceholderType.resolve``
code: def resolve(self, other):
      """See ``PlaceholderType.resolve``"""
      if not isinstance(other, NltkComplexType):
          return None
      other_first = other.first.resolve(other.second)
      if not other_first:
          return None
      other_second = other.second.resolve(other_first)
      if not other_second:
          return None
      return UnaryOpType(
          other_first, self._allowed_substitutions, self._signature
      )
  
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 2 for calling the UnaryOpType obj's underlying member method code with example usage: obj.resolve(other) and returns: UnaryOpType, None, None, None