<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def consume_arguments(self, argument_list):
 """ Takes arguments from a list while this parameter can accept them """

        if len(argument_list) == 0:
            return []
        if argument_list[0] == self.arg_name:
            argument_list = argument_list[1:]
            if self.constraint is bool:
                self.value = not self.value
            else:
                try:
                    value = argument_list.pop(0)
                except IndexError:
                    raise ParameterError('Argument %s expects a value' % self.arg_name)
                self.value = value
        return argument_list