def patch_qs(url: Text, data: Dict[Text, Text]) -> Text:
qs_id = <NUM_LIT:4><EOL>p = list(urlparse(url))<EOL>qs = parse_qsl(p[qs_id])  <EOL>patched_qs = list(chain(<EOL>filter(lambda x: x[<NUM_LIT:0>] not in data, qs),<EOL>data.items(),<EOL>))<EOL>p[qs_id] = urlencode(patched_qs)<EOL>return urlunparse(p)<EOL>
Given an URL, change the query string to include the values specified in
the dictionary.

If the keys of the dictionary can be found in the query string of the URL,
then they will be removed.

It is guaranteed that all other values of the query string will keep their
order.