def urls_are_equal(url1, url2):
url1 = URLObject(url1)<EOL>url2 = URLObject(url2)<EOL>return (<EOL>url1.without_query() == url2.without_query() and<EOL>url1.query_multi_dict == url2.query_multi_dict<EOL>)<EOL>
Compare to URLs for equality, ignoring the ordering of non-ordered elements.