The criterion for "legitimate government" is very well established. It's "has effective control of the territory".
It's a low bar, and clearly one that the current Venezuelan government clears.