I am trying to translate some code to do a Monte Carlo Simulation in Python, specifically the following, but am having a hard time finding the equivalent function replicate