def is_a_spanquery(obj):
 return isinstance(obj, (SpanTermQuery, SpanFirstQuery, SpanOrQuery, SpanMultiQuery))

def is_a_spanquery ( obj ) : return isinstance ( obj , ( SpanTermQuery , SpanFirstQuery , SpanOrQuery , SpanMultiQuery ) )
returns if the object is a span query .