human
Solve the following python programming problem given the following code:
def __arbitrary_generator(self, gen, value_func = None) : 
    'Constructs arbitrary generator based on given object.

        It can be a function that returns a single value,
        a generator function (that uses ``yield``) or a generator class
        (with ``__iter__`` and ``next`` methods).
        ' 
    if (value_func is None) : 
        value_func = (lambda v : v) 
if (inspect.isgeneratorfunction (gen) or inspect.isclass (value_func)) : 
        @ functools.wraps (gen) 
        def wrapper(* args, **kwargs) : 
            (args, kwargs) = self.__coerce_to_arbitraries (args, kwargs) 
            for obj in gen (* args, ** kwargs) : 
                (yield value_func (obj)) 
else : 
        @ functools.wraps (gen) 
        def wrapper(* args, **kwargs) : 
            (args, kwargs) = self.__coerce_to_arbitraries (args, kwargs) 
            while True : 
                (yield value_func (gen (* args, ** kwargs))) 
return wrapper 

    
    

    Fix the buggy line: if (inspect.isgeneratorfunction (gen) or inspect.isclass (value_func)) :
assistant
#Here is Python program to fix the buggy line: if (inspect.

if (inspect.isgeneratorfunction (gen) or inspect.isclass (gen)) :