Hi,
I'm not an expert with AWS Python SDK.
The code for get_secret_value can be found here. You should most probably define the class in your code and then use that class.
Let me know if that helps. If not, you may ask for help on the AWS repository itself.
Regards,
Xavier
Xavier BIZOUX
Advisory Technical Architect ● Global Enablement and Learning
Technology Transfer and Governance, R&D