def _set_souma_id(app):

    # Load/set secret key
    try:
        with open(app.config["SECRET_KEY_FILE"], 'rb') as f:
            app.config['SECRET_KEY'] = f.read(24)
    except IOError:
        # Create new secret key
        app.logger.debug("Creating new secret key")
        app.config['SECRET_KEY'] = os.urandom(24)
        with open(app.config["SECRET_KEY_FILE"], 'wb') as f:
            os.chmod(app.config["SECRET_KEY_FILE"], 0700)
            f.write(app.config['SECRET_KEY'])

    # Generate ID used to identify this machine
    app.config['SOUMA_ID'] = SHA256.new(app.config['SECRET_KEY'] + str(app.config['LOCAL_PORT'])).hexdigest()[:32]
L{getDeprecationWarningString} takes an additional replacement parameter
dataset/ETHPy150Open ciex/souma/nucleus/helpers.py/_set_souma_id--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_deprecate.py/TestDeprecationWarnings.test_getDeprecationWarningStringReplacement