def _flatten(items):
    """Yield items from any nested iterable; see Reference."""
    for x in items:
        if isinstance(x, Iterable) and not isinstance(x, (str, bytes)):
            for sub_x in flatten(x):
                yield sub_x
        else:
            yield x
Yield items from any nested iterable; see Reference.
applications/DeepSpeed-VisualChat/utils/data/DST.py