import requests


def post_service3(url, rhythm_key_pair):
    """Using our existing user data from s1, we use this function to
    poll s3 with a post request for a new note length.

    Keyword Arguments:
        url: The url of service 3.
        rhythm_key_pair: A key pair rhythm list dictionary.

    """

    service_3_response = requests.post(url, json=rhythm_key_pair)
    json_response_data = service_3_response.json()
    status_code_response = service_3_response.status_code

    print("\n ----------- Service 3 POST Response ----------- \n")

    print(f'Data: {json_response_data}')
    print(f'Response Code: {status_code_response}')

    print("\n ----------- End of Service 3 POST Response ----------- \n")

    return json_response_data