def get_reference(node):
    """Get a Devicetree reference to a node

    For example:
     - With label: "serial0: uart@10013000 {};" -> "&serial0"
     - Without label: "uart@10013000 {};" -> "&{/path/to/uart@10013000}"
    """
    if node.label != "":
        return "&%s" % node.label
    return "&{%s}" % node.get_path()