def get_component_allocations(current_example_row, model_config):
    """
    Get allocation of components from CSV test data
    :param current_example_row: CSV test data as pandas data frame
    :param model_config: configurations for pcm model that contain server names, component names, ...
    :return: allocations dict = {
        allocation_id: cpu_id,
        ...
    }
    """
    allocations = {}
    # get allocation for every component that is declared in the config file
    for component in model_config["components"]:
        # check if column (with name of component) of current test data is allocated to existing server
        if current_example_row[component] in model_config["server"].keys():
            # if component is allocated to existing server append allocation to list
            for server_id in model_config["server"]:
                # if component is part of composite
                if current_example_row[component] == server_id:
                    # map component id : server id
                    allocations[model_config['components'][component]] = model_config["server"][server_id]
    return allocations