Is there a way to change LibreOffice Location for Python Scripts?

Is there a way to change LibreOffice Location for Python Scripts?
How do I change the location of share, share:uno_packages, user and user:uno_packages for the duration of a LibreOffice session?

I am using OooDev here but it mostly just creates a connection string here.

"/usr/lib/libreoffice/program/soffice" --norestore --invisible --nofirststartwizard --nologo -env:UserInstallation="file:///tmp/tmpmcfkc_4g/user_profile" -env:UNO_SHARED_PACKAGES_CACHE="file:///tmp/tmpmcfkc_4g/shared_packages_cache" -env:UNO_USER_PACKAGES_CACHE="file:///tmp/tmpmcfkc_4g/user_packages_cache" --accept="socket,host=localhost,port=2002,tcpNoDelay=1;urp;"

I am attempting to change the location of Python Scripts for the duration of a session of LibreOffice.
Using the -env: I can change the user install directory,
Running the following script creates a tmp folder with a tree structure that can be seen here.

from __future__ import annotations
import logging
from pathlib import Path
import tempfile
from urllib.parse import unquote
import platform
import uno
from ooodev.calc import CalcDoc
from ooodev.loader import Lo
from ooodev.loader.inst.options import Options as LoOptions
from ooodev.io.log import logging as logger


def main():
    # Enable tracemalloc

    # https://help.libreoffice.org/latest/en-US/text/shared/guide/start_parameters.html
    # /usr/lib/libreoffice/program/fundamentalrc for environment variables
    # UNO_SHARED_PACKAGES_CACHE manages installed for all users extensions
    # UNO_USER_PACKAGES_CACHE manages installed for all current extensions
    # UserInstallation manages user profile and User installed extensions
    # SHARED_EXTENSIONS_USER Not sure
    # BUNDLED_EXTENSIONS Not Sure
    # BUNDLED_EXTENSIONS_USER Not Sure
    # BAK_EXTENSIONS Not Sure
    # TMP_EXTENSIONS Not Sure
    logger.set_log_level(logging.DEBUG)
    options = LoOptions(log_level=logging.DEBUG)
    headless = False

    with tempfile.TemporaryDirectory() as tmpdirname:
        tmpdir = Path(tmpdirname).as_uri()
        extended_args = [
            f'-env:UserInstallation="{tmpdir}/user_profile"',
            f'-env:UNO_SHARED_PACKAGES_CACHE="{tmpdir}/shared_packages_cache"',
            f'-env:UNO_USER_PACKAGES_CACHE="{tmpdir}/user_packages_cache"',
        ]
        with Lo.Loader(Lo.ConnectSocket(headless=headless, extended_args=extended_args), opt=options) as loader:
            print("Loaded")

            doc = None
            try:
                doc = CalcDoc.create_doc(loader=loader, visible=not headless)
                print("share", expandUri("vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/Scripts/python"))
                print("share:uno_packages", expandUri("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE/uno_packages"))
                print(
                    "user",
                    expandUri(
                        "vnd.sun.star.expand:${$BRAND_INI_DIR/"
                        + toIniName("bootstrap")
                        + "::UserInstallation}/user/Scripts/python"
                    ),
                )
                print("user:uno_packages", expandUri("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE/uno_packages"))

                print("Done")
            finally:
                if doc:
                    doc.close()


def expandUri(uri):
    if uri.startswith("vnd.sun.star.expand:"):
        uri = uri.replace("vnd.sun.star.expand:", "", 1)
        uri = (
            uno.getComponentContext()
            .getByName("/singletons/com.sun.star.util.theMacroExpander")  # type: ignore
            .expandMacros(unquote(uri))
        )
    if uri.startswith("file:"):
        uri = uno.absolutize("", uri)
    return uri


def toIniName(str):
    if platform.system() == "Windows":
        return str + ".ini"
    else:
        return str + "rc"


if __name__ == "__main__":
    main()

However, no matter what I try the share, share:uno_packages, user and user:uno_packages still stay the same.
Anyone know how to fix this?

share file:///usr/lib/libreoffice/share/Scripts/python
share:uno_packages file:///var/spool/libreoffice/uno_packages/cache/uno_packages
user file:///home/paul/.config/libreoffice/4/user/Scripts/python
user:uno_packages file:///home/paul/.config/libreoffice/4/user/uno_packages/cache/uno_packages

Here is a screenshot of the paths in Calc.