Added requirement isinstance(result, Iterable) for multi-line output.