py: Remove redundant global in inversions.py