A domain is a leaf when no upstream domain feeds into it — its
inlet_nexus_ids slot is empty.
Examples
g <- sf::read_sf(system.file("extdata/walker.gpkg", package = "hydroloom"))
h <- hy(g) |>
add_toids() |>
add_levelpaths(name_attribute = "GNIS_ID",
weight_attribute = "arbolate_sum")
d <- decompose_network(h)
is_leaf_domain(d, names(d$domains)[[1]])
#> [1] TRUE
