For any configuration, you can extract the Python code defining it using the (semi-secret) method _script(). So, you could do
optimized_config=nlread("file.nc", BulkConfiguration)[-1]
with open("new_script.py", "w") as f:
f.write(optimized_config._script())
to write a Python file corresponding to the LAST configuration in the file "file.nc".