local_weighted_learning.py: fix mypy errors and more
#8073
Merged
local_weighted_learning.py: fix mypy errors and more
#8073