The paper of Ducros "Cohomologie non-ramifiée sur une courbe p-adique lisse" mentions a theorem (1.21) about the existence of a "polyhedron of variation" of an invertible function on a Berkovich curve. Here is the statement:

Let $Y$ be an analytic curve over a non-Archimedean non-trivially valued field $k$, and let $f$ be an invertible analytic function on $Y$. Then there exists a polyhedron $P$ in $Y^{an}$ such that $|f|$ is constant on each connected component of the complement $Y \setminus P$.

(here, "polyhedron" is 1-dimensional and is understood as a realization of a graph as a topological space)

My question is: is it true that $P$ has finitely many vertices, i.e. points that do not have a neighbourhood homeomorphic to an interval $(a,b) \subset \mathbb{R}$? If this is not to be expected in general, is it true if one assumes $Y$ to be a subspace of a smooth projective curve $X$ over $k$ and $f$ to be the restriction of a rational function on $X$ to $Y$?