pub fn flatten_nested<T>(buffers: Vec<Box<dyn InputBuffer>>) -> Vec<Box<T>>where T: Any,
If any of the InputBuffer elements is a Vec itself, flatten it recursively. Return the concatenated input buffers all downcast to T.