def __init__(self, host, refresh_token, user_agent, source,
               host_override=None, extra_headers=None, save_cookies=False,
               auth_tries=None, account_type=None, debug_data=True, secure=True,
               ignore_certs=False, rpc_tries=3):
    """Creates a new HttpRpcServerOauth2.

    Args:
      host: The host to send requests to.
      refresh_token: A string refresh token to use, or None to guide the user
        through the auth flow. (Replaces auth_function on parent class.)
      user_agent: The user-agent string to send to the server. Specify None to
        omit the user-agent header.
      source: Tuple, (client_id, client_secret, scope), for oauth credentials.
      host_override: The host header to send to the server (defaults to host).
      extra_headers: A dict of extra headers to append to every request. Values
        supplied here will override other default headers that are supplied.
      save_cookies: If the refresh token should be saved.
      auth_tries: The number of times to attempt auth_function before failing.
      account_type: Ignored.
      debug_data: Whether debugging output should include data contents.
      secure: If the requests sent using Send should be sent over HTTPS.
      ignore_certs: If the certificate mismatches should be ignored.
      rpc_tries: The number of rpc retries upon http server error (i.e.
        Response code >= 500 and < 600) before failing.
    """
    super(HttpRpcServerOauth2, self).__init__(
        host, None, user_agent, None, host_override=host_override,
        extra_headers=extra_headers, auth_tries=auth_tries,
        debug_data=debug_data, secure=secure, ignore_certs=ignore_certs,
        rpc_tries=rpc_tries)

    if not isinstance(source, tuple) or (3, 4) not in len(source):
      raise TypeError('Source must be tuple (client_id, client_secret, scope).')

    self.client_id = source[0]
    self.client_secret = source[1]
    self.scope = source[2]
    oauth2_credential_file = (len(source) > 3 and source[3]
                              or '~/.appcfg_oauth2_tokens')

    if save_cookies:
      self.storage = oauth2client_file.Storage(
          os.path.expanduser(oauth2_credential_file))
    else:
      self.storage = NoStorage()

    self.refresh_token = refresh_token
    if refresh_token:
      self.credentials = client.OAuth2Credentials(
          None,
          self.client_id,
          self.client_secret,
          refresh_token,
          None,
          ('https://%s/o/oauth2/token' %
           os.getenv('APPENGINE_AUTH_SERVER', 'accounts.google.com')),
          self.user_agent)
    else:
      self.credentials = self.storage.get()
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appengine_rpc_httplib2.py/HttpRpcServerOauth2.__init__/swapped operands of `not in`