def is_same_url(x, y):
    """Returns True if x and y should be parsed as the same URLs, otherwise return False."""
    parsed_x = x.parsed
    parsed_y = y.parsed
    return (
        parsed_x.netloc == parsed_y.netloc
        and parsed_x.path.strip("/") == parsed_y.path.strip("/")
        and parsed_x.query == parsed_y.query
    )