code: def _add_query_parameters(base_url, name_value_pairs):
      
      if len(name_value_pairs) == 0:
          return base_url
  
      scheme, netloc, path, query, frag = urlsplit(base_url)
      query = parse_qsl(query)
      query.extend(name_value_pairs)
      return urlunsplit((scheme, netloc, path, urlencode(query), frag))
docs: Add one query parameter to a base URL.
  
      :type base_url: string
      :param base_url: Base URL (may already contain query parameters)
  
      :type name_value_pairs: list of (string, string) tuples.
      :param name_value_pairs: Names and values of the query parameters to add
  
      :rtype: string
      :returns: URL with additional query strings appended.