is there a way to use the level of a custom enchantment as a function macro in run_function?

i've found myself a few times now wishing i could pass the level of the enchantment to the function i'm running through the run_function effect component as a macro.
Continue to help post