def common_items_percentage(pronac, seg_common_items):
    """
    Returns the percentage of items in a project that are
    common in the cultural segment.
    """
    if len(seg_common_items) == 0:
        return 0

    project_items = get_project_items(pronac).values[:, 0]
    project_items_amount = len(project_items)

    if project_items_amount == 0:
        return 1

    common_found_items = sum(
        seg_common_items.isin(project_items)['idPlanilhaItens']
    )

    return common_found_items / project_items_amount
Returns the percentage of items in a project that are
    common in the cultural segment.