<s> from __future__ import unicode_literals , absolute_import <EOL> class Range ( dict ) : <EOL> def __init__ ( self , field_name , gte = None , gt = None , lte = None , lt = None ) : <EOL> super ( Range , self ) . __init__ ( ) <EOL> self . field_name = field_name <EOL> self . gte = gte <EOL> self . gt = gt <EOL> self . lte = lte <EOL> self . lt = lt <EOL> self [ "<STR_LIT>" ] = self . _build_dict ( ) <EOL> def _build_dict ( self ) : <EOL> _range = { <EOL> self . field_name : { } <EOL> } <EOL> if self . gte : <EOL> _range [ self . field_name ] [ "<STR_LIT>" ] = self . gte <EOL> if self . gt : <EOL> _range [ self . field_name ] [ "<STR_LIT>" ] = self . gt <EOL> if self . lte : <EOL> _range [ self . field_name ] [ "<STR_LIT>" ] = self . lte <EOL> if self . lt : <EOL> _range [ self . field_name ] [ "<STR_LIT>" ] = self . lt <EOL> return _range </s>
