def METHOD_NAME(self, mode):
    """
    Sets the PID mode (auto or manual)
    :param mode:
        0 disable auto-PID,
        1 enable auto-PID
    :return:
    """
    if (mode not in [0, 1]):
        raise Exception('valid modes are 0 (off) or 1 (on)')
    self.write('L' + str(mode))
    self.params['autoPID'] = mode