ansible roles and custom module structure

Hello Team,

I have a question about how proper ansible roles and modules should work.

I’m currently working on an ansible role where it has a custom module in it to do some api calls. However with the way the module is set up there is the base module which calls some code not directly present in the module file. I’ll have a folder structure at the bottom for clarification. The reason I ask is that I’m running into issues running this code in tower. As it works locally however fails due to ansible tower not being able to find the correct imports for the file. Is this just a limitation of ansible? Or is there something wrong with how I’m configuring the project thus leading it to not be able to detect the extra helper files? This is in python by the way to avoid confusion. I’ll clarify anything unclear in the replies.

role/
library/
base_module.py
Python_Collections/
helper_package/
helper_module.py

My import statements
base_module.py

That won't work as modules can only rely on code in themselves and
module_utils, this is because they are designed for remote execution
so Ansible creates a 'package' to deliver on the remote host and
execute. It is not feasable to follow any/all imports of code as you
can end up with something unusable, hence the limitation to only
depend on code in module_utils/.
https://docs.ansible.com/ansible/latest/reference_appendices/module_utils.html

sorry, wrong link before
https://docs.ansible.com/ansible/latest/dev_guide/developing_module_utilities.html