ESPHome-Diplay-Lambda source from multiple files via include

Hi
I’m working with esp32_243s028 modules. Based on the device location, I visualize different OT drawings with measurements on the display. These drawings automatically change to the next topic every 20 seconds. Some of these topics, or let’s say pages, are identical on multiple devices, and others are not. Now I’m trying to reuse the code and simplify maintenance. The configuration section, the sensors and everything else is combined as required via includes from different yaml-files. But now I’m struggling with the graphical content from the display section, especially the lambda code. I would like to split up the lambda code into different files, to combine and reuse the code as needed for different OT devices later on.
Is there any chance to split this bunch of lines and printfs into multiple files?
TIA
Jochen