human
Complete the below
def chained(func):

    ''''chained(func)
    A decorator chaining the results of `func`.  Useful for generators.
    Arguments:
    func(function):  The function being decorated.
    Returns:
    A generator function whoose elements are the concatenation of the return
    values from ``func(*args, **kwargs)``.
    Example:
    >>> @chained
    ... def g():
    ...     for x in count():
    ...         yield (x, -x)
    >>> take(6, g())
    [0, 0, 1, -1, 2, -2]'
    '''
assistant
#Here is the Python code you requested.
    def wrapper(*args, **kwargs):
        for xs in func(*args, **kwargs):
            for x in xs:
                (yield x)
    return wrapper