Benchmark Python code