docs: def get_token(self, expires=None):
          """
          :param expires: The time until the returned token expires.
              Must be an instance of :class:`datetime.timedelta`.
              If not specified, the token will expire in 2 hours.
          :returns: A token suitable for use with the Esri geocoding API
          """
          endpoint = 'https://www.arcgis.com/sharing/rest/oauth2/token/'
          query = {'client_id': self._client_id,
                   'client_secret': self._client_secret,
                   'grant_type': 'client_credentials'}
  
          if expires is not None:
              if not isinstance(expires, timedelta):
                  raise Exception('If expires is provided it must be a timedelta instance')
              query['expiration'] = int(expires.total_seconds() / 60)
  
          response_obj = self._get_json_obj(endpoint, query, is_post=True)
  
          return response_obj['access_token']