Updated hf_argparser.py
# What does this PR do?



Works on #19116


## Summary
- [x] adding as parse_yaml_file method to HfArgumentParser with the code above
- [x] refactor the dupe code between parse_json_file and parse_dict similar to the code above
- [ ] add a small test of parse_yaml_file
- [ ] add a small test of parse_json_file



_The documentation is not available anymore as the PR was closed or merged._<|||||>Thanks for your PR! Can you just run `make style` on your branch to fix the code quality issue?<|||||>Yeah Sure!
<|||||>Done @sgugger!!<|||||>Thanks again!