Apply changes from PR #391 by @MarcoGorworworelli: - Fix train_gen() to iterate in proper batch_size chunks instead of yielding all time series at once when permute=False - Add test_data_loader.py to verify batch boundaries