docs: def urlencode(query):
      """Encode string to be used in urls (percent encoding).
  
      :param query: string to be encoded
      :type query: str
      :return: urlencoded string
      :rtype: str
  
      :Example:
          >>> urlencode('pekná líščička')
          'pekn%C3%A1%20l%C3%AD%C5%A1%C4%8Di%C4%8Dka'
      """
      if hasattr(urllib, 'parse'):
          return urllib.parse.urlencode(query)
      else:
          return urllib.urlencode(query)