I need to re-create the below code in Python to verify the signature included in the header of an API response.