def _match_search_query(left, right):
    left_filter = set([value for param_name, value in left
                       if 'filter' in _maybe_decode(param_name)])
    right_filter = set([value for param_name, value in right
                        if 'filter' in _maybe_decode(param_name)])
    left_rest = set([(param_name, value) for param_name, value in left
                     if 'filter' not in _maybe_decode(param_name)])
    right_rest = set([(param_name, value) for param_name, value in right
                      if 'filter' not in _maybe_decode(param_name)])

    try:
        log.info(simplejson.dumps(
            {
                'filter_differences': list(
                    left_filter.symmetric_difference(right_filter)
                ),
                'rest_differences': list(
                    left_rest.symmetric_difference(right_rest)
                ),
            }, encoding='utf-8'
        ))
    except Exception as e:
        log.warning(e)

    return left_filter == right_filter and left_rest == right_rest
dataset/ETHPy150Open IvanMalison/okcupyd/okcupyd_testing/util.py/_match_search_query/original