Extension settings in C++ code

Hi, @jamesobutler

I asked the question too roughly.

I know about python extension method for 3d slicer.
In the above method, I had to combine the custom code I implemented into one file.

convert file below

data_preprocessing.py 

def preprocessing():
...

def show():                                          
...

def set_domain_knowledge():
 ...

data_training.py

def train() : 
...

def val():
...

to

extension_code.py
def preprocessing():
...
def show():                                          
...
def set_domain_knowledge():
 ...
def train() : 
...
def val():
...

In order to extend a module composed of multiple files in python and c++ extension to 3d slicer, do I always have to combine them into one file?
( It does not mean that python files and cpp files are mixed, but means the case of the extension of the python version and the extension of the cpp version. )

image

Can I paste only the main part of the custom code I developed at the bottom of custom_extension.py in the above file, and add the necessary additional modules in the form of files to the custom_extension folder?