You don't need an intermediate span, you can pass
data
directly to my_function
.
data
directly to my_function
.