def METHOD_NAME(self, speed):
    '''Set the speed, represented as a percentage of max
       (a number between 0 and 100).
       This is actually the duty cycle for the PWM pin.
    '''
    if not self.pwm:
        return
    self.speed = speed
    if speed == 0:
        self.set_direction(None)
    elif speed < 0:
        self.set_direction(1)
    else:
        self.set_direction(0)
    self.pwm.ChangeDutyCycle(abs(speed))