Several packages were being imported inside function or classes to avoid making them hard dependencies (such as ipywidgets, pythreejs etc).
Since we have introduce lazy_loader in #405 , we no longer need to take such precautions.
We should go through the whole codebase and move all imports to the top of files.