Update motor.py

sample code for reference