  Let G be a graph of hyperbolic groups with 2-ended edge groups. We show that
G is hierarchically hyperbolic if and only if G has no distorted infinite
cyclic subgroup. More precisely, we show that G is hierarchically hyperbolic if
and only if G does not contain certain quotients of Baumslag-Solitar groups. As
a consequence, we obtain several new results about this class, such as
quadratic isoperimetric inequality and finite asymptotic dimension.
