A review on the code and improvement of examples and tests is required for the function `layers2samples()`.