Use treestore's id_from_uri method.