def _get_range_type(field_key):
    """Checks field name for a range key word and returns range type."""
    end_of_field_name = field_key.split('_')[-1]
    if end_of_field_name in ['before', 'end']:
        return 'lte'
    if end_of_field_name in ['after', 'start']:
        return 'gte'
    return None