def _set_secret(config_filename):
    if 'secret' in Configuration and Configuration['secret'] is not None:
        secret = Configuration['secret']
    else:  # No secret found, generate one and persist it
        secret = hashlib.sha512().hexdigest()
        conf_file = ConfigFile(config_filename)
        conf_file.write_value('secret', secret, BASE_CONFIG_FILE_SECTION)
    Secret.set(secret)
dataset/ETHPy150Open box/ClusterRunner/main.py/_set_secret/original