[from_pretrained] imporve the error message when `_no_split_modules` is not defined
# What does this PR do?
As a lot of issues seem to have appeared related to this, the warning is improved. 
Adresses #23816
_The documentation is not available anymore as the PR was closed or merged._<|||||>Thanks, though black would format it! <|||||>Tests are again unrealted to the PR, will merge once the doc is built