def add_var(self, method, args, kwargs):
    if (not isinstance(kwargs.get('separator', ''), str)):
        raise InterpreterException("EnvironmentVariablesHolder methods 'separator' argument needs to be a string.")
    if (len(args) < 2):
        raise InterpreterException('EnvironmentVariablesHolder methods require at least2 arguments, first is the name of the variable and following one are values')
    if ((method != self.held_object.set) and self.held_object.has_name(args[0])):
        mlog.warning('Overriding previous value of environment variable {!r} with a new one'.format(args[0]), location=self.current_node)
    self.held_object.add_var(method, args[0], args[1:], kwargs)
def add_var(self, method, args, kwargs):
    if (not isinstance(kwargs.get('separator', ), str)):
        raise InterpreterException("EnvironmentVariablesHolder methods 'separator' argument needs to be a string.")
    if (len(args) < 2):
        raise InterpreterException('EnvironmentVariablesHolder methods require at least2 arguments, first is the name of the variable and following one are values')
    if ((method != self.held_object.set) and self.held_object.has_name(args[0])):
        mlog.warning('Overriding previous value of environment variable {!r} with a new one'.format(args[0]), location=self.current_node)
    self.held_object.add_var(method, args[0], args[1:], kwargs)