* This includes:
- Incorrect comparisons
- Missing type annotations where it can't be inferred
- Variable shadowing and bad use
- Unused imports
- asserts for non-None on types
* Passes clean on strict pyright checking except for
`reportMissingParameterType`, `reportUnusedVariable`, and
`reportOptionalMemberAccess` which are all too spammy and low value to be
worth addressing.
More checking of GSM local/global cache behaviour when debugging
One test is not GPU stable and its results are verified against hard coded expectation (this is to test the expected behaviour of the local GSM cache on the active thread)