Introduce function for executing a piece of code