def METHOD_NAME(attr, pos, name=None,
                           formatter=None, color='black',
                           ftype='sans-serif',
                           min_fsize=6, max_fsize=15,
                           padding_x=0, padding_y=0):
    branch_attr_face = AttrFace(attr,
            formatter=formatter,
            name=name or f'branch_{attr}',
            color=color, ftype=ftype,
            min_fsize=min_fsize, max_fsize=max_fsize,
            padding_x=padding_x,
            padding_y=padding_y)
    def layout_fn(node):
        if not node.is_leaf and (node.dist is None or node.dist > 0):
            node.add_face(branch_attr_face, position=pos, column=0)
            node.add_face(branch_attr_face, position=pos, column=0,
                    collapsed_only=True)
    return layout_fn