def end_comp(n_current_comp, tmp_components, final_components, cnt_wcc_id):
    """
    Store the component
    :param n_current_comp:
    :param tmp_components:
    :param storage_path:
    :return:
    """
    comp_to_store = tmp_components[n_current_comp]
    comp_to_store.id = cnt_wcc_id
    final_components.append(comp_to_store)
    tmp_components[n_current_comp] = None
    cnt_wcc_id += 1
    return cnt_wcc_id
