Any reason why the import statements are inside the function definitions and not at the top of the module?