Error in importing private package

My private app is deployed on the streamlit cloud.
In my code, I’m cloning a private repo (called nest) into a /tmp folder using this subprocess command:

        [f"git clone https://${{token}}***/nest.git /tmp/nest"],

then adding it to the pythonpath with sys:
sys.path = ["/tmp"]+sys.path
and then importing using
import nest

This works.
However, trying to import a submodule from nest like
from nest import x
results in an error:
ImportError: cannot import name 'x' from 'nest' (/tmp/nest/
even though there is an file in the nest folder and of course the x folder exists. Locally this works no problem.

It’s important to note that I do the exact same thing to another private repo and it works no problem.
Would love insights, thanks!