Howto time function execution with Python

I recently had a requirement to test performance of a function call in a python script I have written. After searching the web, I finally stumbled upon a python module called timeit. After searching how to use it, I stumbled upon this blog post that explains how to wrap a function call and execute that function with timeit several times to get average execution time.
So, here's the code that I've taken from above mentioned blog post.