We used a broadly similar approach for Python with one exception: we used the time function from the time package.
We carried out measurements for the JavaScript code by calculating the time difference between the Date.now() value at the beginning of a function and the end. We used a broadly similar approach for Python with one exception: we used the time function from the time package.