def node_to_internal_type(node):
    """
    Use the internal_type property of a node (bblfsh.Node) as its final path representation
    :param node: base_node
    :return: node's internal_type or the string itself (in case its UP/DOWN token or a leaf)
    """
    if type(node) == str:
        return node
    return node.internal_type