class_docstr: Google Geocoding API
  ====================
  Geocoding is the process of converting addresses into geographic
  coordinates (like latitude 37.423021 and longitude -122.083739),
  which you can use to place markers or position the map.
  API Reference
  -------------
  https://developers.google.com/maps/documentation/geocoding
  
  For ambiguous queries or 'nearby' type queries, use the Places Text Search instead.
  https://developers.google.com/maps/documentation/geocoding/best-practices#automated-system
  
  Parameters
  ----------
  :param location: Your search location you want geocoded.
  :param components: Component Filtering
  :param method: (default=geocode) Use the following:
      > geocode
      > places
      > reverse
      > timezone
      > elevation
  :param key: Your Google developers free key.
  :param language: 2-letter code of preferred language of returned address elements.
  :param client: Google for Work client ID. Use with client_secret. Cannot use with key parameter
  :param client_secret: Google for Work client secret. Use with client.
class_docstr_tok: ["Google","Geocoding","API","====================","Geocoding","is","the","process","of","converting","addresses","into","geographic","coordinates","(","like","latitude","37.423021","and","longitude","-122.083739",")",",","which","you","can","use","to","place","markers","or","position","the","map",".","API","Reference","--","--","--","--","--","--","-","https",":","\/\/developers.google.com\/maps\/documentation\/geocoding","For","ambiguous","queries","or","'nearby","'","type","queries",",","use","the","Places","Text","Search","instead",".","https",":","\/\/developers.google.com\/maps\/documentation\/geocoding\/best-practices","#","automated-system","Parameters","--","--","--","--","--",":","param","location",":","Your","search","location","you","want","geocoded",".",":","param","components",":","Component","Filtering",":","param","method",":","(","default=geocode",")","Use","the","following",":",">","geocode",">","places",">","reverse",">","timezone",">","elevation",":","param","key",":","Your","Google","developers","free","key",".",":","param","language",":","2-letter","code","of","preferred","language","of","returned","address","elements",".",":","param","client",":","Google","for","Work","client","ID",".","Use","with","client_secret",".","Can","not","use","with","key","parameter",":","param","client_secret",":","Google","for","Work","client","secret",".","Use","with","client","."]
docstr: Sign a request URL with a Crypto Key.
  Usage:
  from urlsigner import sign_url
  signed_url = sign_url(base_url=my_url,
                        params=url_params,
                        client_secret=CLIENT_SECRET)
  Args:
  base_url - The trunk of the URL to sign. E.g. https://maps.googleapis.com/maps/api/geocode/json
  params - List of tuples of URL parameters INCLUDING YOUR CLIENT ID ('client','gme-...')
  client_secret - Your Crypto Key from Google for Work
  Returns:
  The signature as a dictionary #signed request URL
docstr_tok: ["Sign","a","request","URL","with","a","Crypto","Key",".","Usage",":","from","urlsigner","import","sign_url","signed_url","=","sign_url","(","base_url=my_url",",","params=url_params",",","client_secret=CLIENT_SECRET",")","Args",":","base_url","-","The","trunk","of","the","URL","to","sign",".","E.g",".","https",":","\/\/maps.googleapis.com\/maps\/api\/geocode\/json","params","-","List","of","tuples","of","URL","parameters","INCLUDING","YOUR","CLIENT","ID","(","'client","'",",","'gme-","...","'",")","client_secret","-","Your","Crypto","Key","from","Google","for","Work","Returns",":","The","signature","as","a","dictionary","#","signed","request","URL"]
code: def _sign_url(self, base_url=None, params=None, client_secret=None):
      """Sign a request URL with a Crypto Key.
      Usage:
      from urlsigner import sign_url
      signed_url = sign_url(base_url=my_url,
                            params=url_params,
                            client_secret=CLIENT_SECRET)
      Args:
      base_url - The trunk of the URL to sign. E.g. https://maps.googleapis.com/maps/api/geocode/json
      params - List of tuples of URL parameters INCLUDING YOUR CLIENT ID ('client','gme-...')
      client_secret - Your Crypto Key from Google for Work
      Returns:
      The signature as a dictionary #signed request URL
      """
      import hashlib
      import hmac
      import base64
  
      if six.PY3:
          from urllib.parse import urlparse, urlencode
      else:
          from urllib import urlencode
          from urlparse import urlparse
  
      # Return if any parameters aren't given
      if not base_url or not self.client_secret or not self.client:
          return None
  
      # assuming parameters will be submitted to Requests in identical order!
      url = urlparse(base_url + "?" + urlencode(params))
  
      # We only need to sign the path+query part of the string
      url_to_sign = (url.path + "?" + url.query).encode("utf-8")
  
      # Decode the private key into its binary format
      # We need to decode the URL-encoded private key
      decoded_key = base64.urlsafe_b64decode(client_secret)
  
      # Create a signature using the private key and the URL-encoded
      # string using HMAC SHA1. This signature will be binary.
      signature = hmac.new(decoded_key, url_to_sign, hashlib.sha1)
  
      # Encode the binary signature into base64 for use within a URL
      encoded_signature = base64.urlsafe_b64encode(signature.digest())
  
      # Return signature (to be appended as a 'signature' in params)
      return encoded_signature
  
imports: from __future__ import absolute_import
  import six
  from geocoder.base import OneResult, MultipleResultsQuery
  from geocoder.keys import google_key, google_client, google_client_secret
  from collections import OrderedDict
  import ratelim
label_desc: Use image node_id 4 for calling the GoogleQuery obj's underlying member method code with example usage: obj._sign_url(base_url, params, client_secret) and returns: encoded_signature, None