Update lsm.py

corrected error