* Fixed bugs in tests due to MagicMocks not being threadsafe
* Optimized tests for better performance
This PR has passed 10 consecutive full pipeline runs with no errors, as well as 1000 consecutive runs on a local machine
* twin implimentation and tests. Also unit test speedup.
* formatting for flake8
* fix for test on 2.7
* fixup after merge
* e2e fix
* code review feedback
* More code review comments