Added twist() to lattices.py