  We investigate the existence of ground states for the focusing subcritical
NLS energy on metric graphs with localized nonlinearities. In particular, we
find two thresholds on the measure of the region where the nonlinearity is
localized that imply, respectively, existence or nonexistence of ground states.
In order to obtain these results we adapt to the context of metric graphs some
classical techniques from the Calculus of Variations.
