Ensure dib-run-parts profiling works with py3 and py2

This change adjusts the "inline" python function used to profile
run-parts duration to make it run successfully on both py2 and py3

Change-Id: Ib5287a56b8e2b3e882dca489192f01d9f01cd8ba
Merge "Ensure dib-run-parts profiling works with py3 and py2"