Inserts topic/score data for a user to a PServer client.

    Inputs: - host_name: A string containing the address of the machine where the PServer instance is hosted.
            - client_name: The PServer client name.
            - client_pass: The PServer client's password.
            - user_twitter_id: A Twitter user identifier.
            - topic_to_score: A python dictionary that maps from topic to score.

def insert_user_data(host_name, client_name, client_pass, user_twitter_id, topic_to_score):
    """
    Inserts topic/score data for a user to a PServer client.

    Inputs: - host_name: A string containing the address of the machine where the PServer instance is hosted.
            - client_name: The PServer client name.
            - client_pass: The PServer client's password.
            - user_twitter_id: A Twitter user identifier.
            - topic_to_score: A python dictionary that maps from topic to score.
    """

    # Construct values.
    values = "usr=" + str(user_twitter_id)

    for topic, score in topic_to_score.items():
        values += "&type." + topic + "=%.2f" % score

    # Construct request.
    request = construct_request(model_type="pers",
                                client_name=client_name,
                                client_pass=client_pass,
                                command="setusr",
                                values=values)

    # Send request.
    send_request(host_name,
                 request)