Applying APM Transaction labels to autogenerated spans (python)

I know this might have been asked before but is there any way to make autogenerated spans from custom code (no framework) inherit the same labels as their parent transactions with the python apm-agent?

Thanks!