def _lte(field, value, document):
    """
    Returns True if the value of a document field is less than or
    equal to a given value
    """
    try:
        return document.get(field, None) <= value
    except TypeError:  # pragma: no cover Python < 3.0
        return False
def _lte ( field , value , document ) : try : return document . get ( field , None ) <= value except TypeError : return False
Returns True if the value of a document field is less than or
    equal to a given value