code: def normalize_query(text, encoding='utf-8'):
      '''Normalize a query string.
  
      Percent-encodes unacceptable characters and ensures percent-encoding is
      uppercase.
      '''
      path = percent_encode_plus(text, encoding=encoding)
      return uppercase_percent_encoding(pathf normalize_query(text, encoding='utf-8'):
      '''Normalize a query string.
  
      Percent-encodes unacceptable characters and ensures percent-encoding is
      uppercase.
      '''
      path = percent_encode_plus(text, encoding=encoding)
      return uppercase_percent_encoding(path)
docs: Normalize a query string.
  
      Percent-encodes unacceptable characters and ensures percent-encoding is
      uppercase.