def parse_criteria(criteria):
 left = criteria.left
 if (left.__class__.__name__ == 'AnnotatedColumn'):
  left_val = criteria.left.name
 else:
  raise NotImplementedError()
 right = criteria.right
 if (right.__class__.__name__ == 'BindParameter'):
  right_val = criteria.right.value
 elif (right.__class__.__name__ == 'False_'):
  right_val = False
 elif (right.__class__.__name__ == 'True_'):
  right_val = True
 else:
  raise NotImplementedError()
 return (left_val, right_val)

def parse_criteria ( criteria ) : left = criteria . left if ( left . __class__ . __name__ == 'AnnotatedColumn' ) : left_val = criteria . left . name else : raise NotImplementedError ( ) right = criteria . right if ( right . __class__ . __name__ == 'BindParameter' ) : right_val = criteria . right . value elif ( right . __class__ . __name__ == 'False_' ) : right_val = False elif ( right . __class__ . __name__ == 'True_' ) : right_val = True else : raise NotImplementedError ( ) return ( left_val , right_val )
builds a unique key for the filter operator .