You can try what is mentioned in this post:
Either use the system property or you can migrate the provided code to python.