How to do apt-get install inside Google App Engine

I have deployed a Web Application in the Google App Engine. The Application gets the doc and docx files and convert it to PDF and then uploads to Google Drive.

Issue i am facing is, Python uses doc2pdf library to convert the doc file to PDF. The doc2pdf internally uses apt install libreoffice-writer -y library to convert it to PDF.

How can i install the apt install libreoffice-writer -y in the Google App Engine.

Any help is very helpful.

Source: Python-3x Questions