### What problem does this PR solve? Optimize dataset validation and add function docs ### Type of change - [x] Refactoring