Is it possible to get list of models by tag selector inside macro

I’m doing some specific actions with models tagged. Names of those models have to hardcode inside macros, but as number is increasing - it is easy to forget them. All those models could be easily picked up by tag.

Is there a way to use selector by tag inside macro to get list of model having such tag?

according to this reply can’t run dbt CLI commands from a macro.
But, tags look to be part of the graph context variable, which is accessible from a macro

Thank you! That is what I was looking for!