Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.
Fixes: #81901
(cherry picked from commit 8a5ccc9d63)
Provide a better error message when encountering a YAML requirements file that is not a dictionary or list.
Fixes: #81901
(cherry picked from commit 8a5ccc9d63)