<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flatten(iterable, check=is_iterable):
 """Produces a recursively flattened version of ``iterable`` ``check`` Recurses only if check(value) is true. """

    for value in iterable:
        if check(value):
            for flat in flatten(value, check):
                yield flat
        else:
            yield value