Access memory pointer <td.function at 0x000001E82266EE50>

I am using python code that prints the following when I run it: <td.run at 0x00001E81166EE50>. When I run the code outside of TD it prints the output as expected. How can I extract the output from the memory pointer to interact with the output in TD? Any suggestions on what to look into? Sample image below. Thanks!

The td.run is an object that describes/controls the task started by someDat.run().

https://docs.derivative.ca/Run_Class

Rather than using print() and trying to capture the output, it would be easier to have the code put the results into return values and have your code call methods from the dat rather than executing the whole thing as a script.

results = op('TikTokScraper').module.doStuff()