<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flip_motion(self, value):

 """Toggle motion detection"""

        if value:
            self.cam.enable_motion_detection()
        else:
            self.cam.disable_motion_detection()