code: def flatten(iterable, check=is_iterable):
      
      for value in iterable:
          if check(value):
              for flat in flatten(value, check):
                  yield flat
          else:
              yield value
docs: Produces a recursively flattened version of ``iterable``
  
      ``check``
          Recurses only if check(value) is true.