how to create a machine translation plugin of OpenAI for SDL Trados 2017 with Python codes

Given popularity of ChatGPT, I'd like to explore how to combine OpenAI API for translation with SDL Trados Studio 2017.

Any help or hints will be much appreciated.

emoji