STYLE: Flake8 "Do not assign a lambda expression, use a def. "
*  Do not assign a lambda expression,  consider using def().
*  Imports at the top 
sorry, this is too far off - I'd suggest you start by reading through the contributing guide, and looking at some good first issues

closing for now then