def get_label(node, data_property: str, id_hidden: bool):
    """
    Get label of node.

    :param ~ttree.Node node: Tree node instance
    :param data_property: Data property name
    :param id_hidden: Is ID hidden?
    :return:
    """
    result = getattr(node.data, data_property) if data_property else node.tag
    return result if id_hidden else f'{result}[{node.id}]'
