def validate(self, customization_args):
        """Ensure TestGadget retains reasonable config."""
        tip_count = len(customization_args['adviceObjects']['value'])
        if tip_count > self._MAX_TIP_COUNT:
            raise utils.ValidationError(
                'TestGadget is limited to %d tips, found %d.' % (
                    self._MAX_TIP_COUNT,
                    tip_count))
        elif tip_count < self._MIN_TIP_COUNT:
            raise utils.ValidationError(
                'TestGadget requires at least %d tips, found %s.' % (
                    self._MIN_TIP_COUNT,
                    tip_count))
dataset/ETHPy150Open oppia/oppia/extensions/gadgets/TestGadget/TestGadget.py/TestGadget.validate/original