@staticmethod<EOL><INDENT>def from_stream(credential_filename):<DEDENT>
if credential_filename and os.path.isfile(credential_filename):<EOL><INDENT>try:<EOL><INDENT>return _get_application_default_credential_from_file(<EOL>credential_filename)<EOL><DEDENT>except (ApplicationDefaultCredentialsError, ValueError) as error:<EOL><INDENT>extra_help = ('<STR_LIT>'<EOL>'<STR_LIT>')<EOL>_raise_exception_for_reading_json(credential_filename,<EOL>extra_help,<EOL>error)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ApplicationDefaultCredentialsError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>
Create a Credentials object by reading information from a file.

        It returns an object of type GoogleCredentials.

        Args:
            credential_filename: the path to the file from where the
                                 credentials are to be read

        Raises:
            ApplicationDefaultCredentialsError: raised when the credentials
                                                fail to be retrieved.