Correct syntax for variable default

I’m trying to set a variable from an external yaml file - if that variable dows not exists I want to have a default fallback
I’ve tried the following syntax which doesn’t seem to work?
${file(some_folders/${self:provider.stage}.yml):customDomain, true}
any ideas./hints on this syntax?

I found nothing obviously wrong in that short post, but would have wished for more depth. Also it is funny that the author consistently calls $_ the default variable. Topic variable is IMHO a much more fitting name. 9Apps Showbox Tutuapp