when i run example.py file the result infinite loop because of derive_key function ? so how can i get the current key?