def get_breadcrumbs(index_instance_node, simple=False, single_link=False, include_count=False):
    """
    Return a joined string of HTML anchors to every index instance's
    parent from the root of the tree to the index instance
    """

    result = []
    if single_link:
        # Return the entire breadcrumb path as a single HTML anchor
        simple = True

    for instance in index_instance_node.get_ancestors():
        result.append(get_instance_link(instance, simple=simple))

    result.append(get_instance_link(index_instance_node, simple=simple))

    output = []

    if include_count:
        output.append('(%d)' * index_instance_node.documents.count())

    if single_link:
        # Return the entire breadcrumb path as a single HTML anchor
        output.insert(
            0, get_instance_link(
                index_instance_node=index_instance_node, text=(
                    ' / '.join(result)
                )
            )
        )
        return mark_safe(' '.join(output))
    else:
        output.insert(0, ' / '.join(result))
        return mark_safe(' '.join(output))
dataset/ETHPy150Open mayan-edms/mayan-edms/mayan/apps/document_indexing/widgets.py/get_breadcrumbs/operator `%` -> `*`