Before we can adequately assist you, would you mind please reading this post and then updating your post:
Specifically the parts about creating a “Minimum Working Example” (what does run_simulation() do, I don’t see it defined in your post), and using triple-backticks properly.