How to pass varibale to the {{souce}} function inside the macro

Hi all, need help here. i am using macro to populate the source table name. but some how, the dbt can not capture it in the documentation due to there is no {{ref}} and {{source}}. now i am trying to add the source key word inside the macro which is as below, but i got the empty in the source table name(second snapshot). but when i used hardcode sourcename and together with the log and print that sourcename. i can see, the sourcename the log has exactly the same name as i expect. so, somehow, the sourcename variable is not right in the {{source}} function. anyone can help on this? if need more details or explanation, i will provide, really appreciate it. thanks