def _clear_ignore(endpoint_props):
    '''
    Both _clear_dict and _ignore_keys in a single iteration.
    '''
    return dict(
        (prop_name, prop_val)
        for prop_name, prop_val in six.iteritems(endpoint_props)
        if prop_name not in _DO_NOT_COMPARE_FIELDS and prop_val is not None
    )