def _GetRpcServer(self):
    """Returns an instance of an AbstractRpcServer.

    Returns:
      A new AbstractRpcServer, on which RPC calls can be made.

    Raises:
      RuntimeError: The user has request non-interactive authentication but the
        environment is not correct for that to work.
    """

    StatusUpdate('Host: %s' % self.options.server, self.error_fh)

    source = GetSourceName()

    dev_appserver = ['localhost', '127.0.0.1'] in self.options.host

    if dev_appserver:
      if not self.rpc_server_class:
        self.rpc_server_class = appengine_rpc.HttpRpcServer
        if hasattr(self, 'runtime'):
          self.rpc_server_class.RUNTIME = self.runtime
      email = self.options.email
      if email is None:
        email = 'test@example.com'
        logging.info('Using debug user %s.  Override with --email', email)
      rpcserver = self.rpc_server_class(
          self.options.server,
          lambda: (email, 'password'),
          GetUserAgent(),
          source,
          host_override=self.options.host,
          save_cookies=self.options.save_cookies,

          secure=False)

      rpcserver.authenticated = True
      return rpcserver

    if not self.rpc_server_class:
      self.rpc_server_class = appengine_rpc_httplib2.HttpRpcServerOAuth2


    oauth2_parameters = self._GetOAuth2Parameters()


    return self.rpc_server_class(self.options.server, oauth2_parameters,
                                 GetUserAgent(), source,
                                 host_override=self.options.host,
                                 save_cookies=self.options.save_cookies,
                                 auth_tries=3,
                                 account_type='HOSTED_OR_GOOGLE',
                                 secure=self.options.secure,
                                 ignore_certs=self.options.ignore_certs,
                                 options=self.options)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppCfgApp._GetRpcServer/swapped operands of `in`