'Execute the call to a WMI method, returning
a tuple (even if is of only one value) containing
the out and return parameters.'

def __call__(self, *args, **kwargs):

    try:
        if self.in_parameters:
            parameter_names = {}
            for (name, is_array) in self.in_parameter_names:
                parameter_names[name] = is_array
            parameters = self.in_parameters
            for n_arg in range(len(args)):
                arg = args[n_arg]
                parameter = parameters.Properties_[n_arg]
                if parameter.IsArray:
                    try:
                        list(arg)
                    except TypeError:
                        raise TypeError(('parameter    %d    must    be    iterable' % n_arg))
                parameter.Value = arg
            for (k, v) in kwargs.items():
                is_array = parameter_names.get(k)
                if (is_array is None):
                    raise AttributeError(('%s    is    not    a    valid    parameter    for    %s' % (k, self.__doc__)))
                elif is_array:
                    try:
                        list(v)
                    except TypeError:
                        raise TypeError(('%s    must    be    iterable' % k))
                parameters.Properties_(k).Value = v
            result = self.ole_object.ExecMethod_(self.method.Name, self.in_parameters)
        else:
            result = self.ole_object.ExecMethod_(self.method.Name)
        results = []
        for (name, is_array) in self.out_parameter_names:
            value = result.Properties_(name).Value
            if is_array:
                results.append(list((value or [])))
            else:
                results.append(value)
        return tuple(results)
    except pywintypes.com_error:
        handle_com_error()
