Python atlas api md5

Hello. Im trying to access the atlas admin api using python. I have my organization private and public keys and I’ve added these to the Mongodb project I want to administer using the atlas api.

I tried the curl command from here: https://www.mongodb.com/docs/atlas/reference/api/ip-access-list/add-entries-to-access-list/
and it worked perfectly. Id like to replicate the same using python. Im using Requests. My first request to just the base url provides a nonce in the response.

I know I have to md5 the nonce, my private key, public key, but in what order? Any other parameters I should be applying the md5 hash to?

Also, what is the format for the second request to the server? Any thoughts? Thank you!