def validate_args(self, args, kwargs):
    if ((len(args) == 1) and isinstance(args[0], list) and (len(args[0]) == 2)):
        mlog.deprecation('Passing a list as the single argument to configuration_data.set is deprecated. This will become a hard error in the future.', location=self.current_node)
        args = args[0]
    if (len(args) != 2):
        raise InterpreterException('Configuration set requires 2 arguments.')
    if self.used:
        raise InterpreterException('Can not set values on configuration object that has been used.')
    (name, val) = args
    if (not isinstance(val, (int, str))):
        msg = 'Setting a configuration data value to {!r} is invalid, and will fail at configure_file(). If you are using it just to store some values, please use a dict instead.'
        mlog.deprecation(msg.format(val), location=self.current_node)
    desc = kwargs.get('description', None)
    if (not isinstance(name, str)):
        raise InterpreterException('First argument to set must be a string.')
    if ((desc is not None) and (not isinstance(desc, str))):
        raise InterpreterException('Description must be a string.')
    return (name, val, desc)
def validate_args(self, args, kwargs):
    if ((len(args) == 1) and isinstance(args[0], list) and (len(args[0]) == 2)):
        mlog.deprecation('Passing a list as the single argument to configuration_data.set is deprecated. This will become a hard error in the future.', location=self.current_node)
        args = args[0]
    if (len(args) != 2):
        raise InterpreterException('Configuration set requires 2 arguments.')
    if self.used:
        raise InterpreterException('Can not set values on configuration object that has been used.')
    (name, val) = args
    if (not isinstance(val, (int, str))):
        msg = 'Setting a configuration data value to {!r} is invalid, and will fail at configure_file(). If you are using it just to store some values, please use a dict instead.'
        mlog.deprecation(msg.format(val), location=self.current_node)
    desc = kwargs.get('description', None)
    if (not isinstance(name, str)):
        raise InterpreterException('First argument to set must be a string.')
    if ((desc is not None) and (not isinstance(desc, str))):
        raise InterpreterException('Description must be a string.')
    return (name, val, desc)