Error in importing private package

Hello,
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}}@github.com/***/nest.git /tmp/nest"],
        shell=True,
    )

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/__init__.py)
even though there is an init.py 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!