Hints: Avoid using nested function
Hints: Avoid using nested function

* This can trigger some bugs occasionally, module level function
  works nicer.

kayhayen/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka