def handle_modules(venv_path, python_worktree):
    qimodules = list()
    for project in python_worktree.python_projects:
        for module in project.modules:
            if module.qimodule:
                qimodules.append(module)
        for package in project.packages:
            if package.qimodule:
                qimodules.append(package)
    if qimodules:
        ui.info()
        ui.info(ui.blue, "::", ui.reset, "Registering Python qi modules")
    for i, qimodule in enumerate(qimodules):
        ui.info_count(i, len(qimodules), ui.blue, qimodule.name)
        to_make = os.path.join(venv_path, "share", "qi", "module")
        qisys.sh.mkdir(to_make, recursive=True)
        to_write = os.path.join(to_make, "%s.mod" % qimodule.name)
        with open(to_write, "w") as fp:
            fp.write("python\n")
Register the qi modules by writing the .mod file in the correct location
dataset/ETHPy150Open aldebaran/qibuild/python/qipy/venv.py/handle_modules