@classmethod<EOL><INDENT>def _from_parsed_json_keyfile(cls, keyfile_dict, scopes,<EOL>token_uri=None, revoke_uri=None):<DEDENT>
creds_type = keyfile_dict.get('<STR_LIT:type>')<EOL>if creds_type != client.SERVICE_ACCOUNT:<EOL><INDENT>raise ValueError('<STR_LIT>', creds_type,<EOL>'<STR_LIT>', client.SERVICE_ACCOUNT)<EOL><DEDENT>service_account_email = keyfile_dict['<STR_LIT>']<EOL>private_key_pkcs8_pem = keyfile_dict['<STR_LIT>']<EOL>private_key_id = keyfile_dict['<STR_LIT>']<EOL>client_id = keyfile_dict['<STR_LIT>']<EOL>if not token_uri:<EOL><INDENT>token_uri = keyfile_dict.get('<STR_LIT>',<EOL>oauth2client.GOOGLE_TOKEN_URI)<EOL><DEDENT>if not revoke_uri:<EOL><INDENT>revoke_uri = keyfile_dict.get('<STR_LIT>',<EOL>oauth2client.GOOGLE_REVOKE_URI)<EOL><DEDENT>signer = crypt.Signer.from_string(private_key_pkcs8_pem)<EOL>credentials = cls(service_account_email, signer, scopes=scopes,<EOL>private_key_id=private_key_id,<EOL>client_id=client_id, token_uri=token_uri,<EOL>revoke_uri=revoke_uri)<EOL>credentials._private_key_pkcs8_pem = private_key_pkcs8_pem<EOL>return credentials<EOL>
Helper for factory constructors from JSON keyfile.

        Args:
            keyfile_dict: dict-like object, The parsed dictionary-like object
                          containing the contents of the JSON keyfile.
            scopes: List or string, Scopes to use when acquiring an
                    access token.
            token_uri: string, URI for OAuth 2.0 provider token endpoint.
                       If unset and not present in keyfile_dict, defaults
                       to Google's endpoints.
            revoke_uri: string, URI for OAuth 2.0 provider revoke endpoint.
                       If unset and not present in keyfile_dict, defaults
                       to Google's endpoints.

        Returns:
            ServiceAccountCredentials, a credentials object created from
            the keyfile contents.

        Raises:
            ValueError, if the credential type is not :data:`SERVICE_ACCOUNT`.
            KeyError, if one of the expected keys is not present in
                the keyfile.