Override PYTHONPATH in custom component

I’m developing a custom component that requires some changes to a python module. So I cloned that module into my repo in the custom_components folder, but it’s not working. Typically I would expect the Python file’s current folder to be the first entry in sys.path. But apparently when running in Home Assistant OS this is not the case and it still imports the module from /usr/local/lib/python3.10/site-packages.