def METHOD_NAME(item):
    """traverse"""
    if isinstance(item, list) or isinstance(item, np.ndarray):
        for i in iter(item):
            for j in METHOD_NAME(i):
                yield j
    else:
        yield item