Subvariety of variety of Lie rings in which all metabelian Lie rings have bounded nilpotency class implies all Lie rings of bounded derived length have bounded nilpotency class

Statement
There exists a function $$g: \mathbb{N} \times \mathbb{N} \to \mathbb{N}$$ such that the following holds.

Suppose $$\mathcal{V}$$ is a subvariety of the variety of Lie rings such that there exists a natural number $$c$$ such that all metabelian Lie rings (i.e., Lie rings of derived length at most two) in $$\mathcal{V}$$ are nilpotent Lie rings with nilpotency class at most $$c$$. Then, for any positive integer $$s$$, all Lie rings in $$\mathcal{V}$$ of derived length at most $$s$$ are nilpotent Lie rings of nilpotency class at most $$g(s,c)$$.

Related facts

 * Subvariety of variety of Lie rings containing no nontrivial perfect Lie rings contains only solvable Lie rings