<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(gamepad=None):
 """Vibrate the gamepad."""

    if not gamepad:
        gamepad = inputs.devices.gamepads[0]

    # Vibrate left
    gamepad.set_vibration(1, 0, 1000)

    time.sleep(2)

    # Vibrate right
    gamepad.set_vibration(0, 1, 1000)
    time.sleep(2)

    # Vibrate Both
    gamepad.set_vibration(1, 1, 2000)
    time.sleep(2)