def _roll_up_small_pie_wedges(resource_data, resource_label, min_percentage):
    """Combine small wedges into a single category. Removes wedges with value 0.

    :param dict resource_data: values for each resource type.
    :param dict resource_label: labels for each resource type.
    :param float min_percentage: roll up small pie pieces into a single category,
        resources with percentage less than the set value will be pooled together,
        defaults to 0.
    :return: (*dict*) -- updated axis data and a list of labels that includes the small
        category label if it exists
    """
    resource_list = list(resource_data.keys())
    total_resources = sum(resource_data.values())

    small_categories = []
    small_category_value = 0
    small_category_label = ""
    for resource in resource_list:
        percentage = round(resource_data[resource] / total_resources * 100, 1)
        if percentage == 0.0:
            resource_data.pop(resource)
        elif percentage <= min_percentage:
            small_categories.append(resource)
            small_category_label += "{0} {1}%\n".format(
                resource_label[resource], percentage
            )
            small_category_value += resource_data[resource]

    if len(small_categories) > 1:
        for resource in small_categories:
            resource_data.pop(resource)

    labels = [resource_label[resource] for resource in resource_data.keys()]

    if len(small_categories) > 1:
        resource_data["other"] = small_category_value
        labels.append(small_category_label)

    return resource_data, labels