Second cohomology group restricted to a subvariety

Case that the acting group is in the variety
Suppose $$\mathcal{V}$$ is a subvariety of the variety of groups, $$G$$ is a group in $$\mathcal{V}$$, and $$A$$ is an abelian group in $$\mathcal{V}$$. Consider a homomorphism $$\varphi:G \to \operatorname{Aut}(A)$$ such that the semidirect product of $$A$$ by $$G$$ for $$\varphi$$ is indeed in $$\mathcal{V}$$.

The second cohomology group restricted to $$\mathcal{V}$$, which we denote by $$H^2_{\mathcal{V}}(G,A)$$, is defined as the subgroup of the second cohomology group $$H^2(G,A)$$ comprising those extensions that are in $$\mathcal{V}$$.

General case
Suppose $$\mathcal{V}$$ is a subvariety of the variety of groups, $$G$$ is a group (not necessarily in $$\mathcal{V}$$) and $$A$$ is an abelian group in $$\mathcal{V}$$. C onsider the homomorphism $$\varphi:G \to \operatorname{Aut}(A)$$ such that the verbal subgroup $$V(G)$$ of $$G$$ corresponding to $$\mathcal{V}$$ acts trivially on $$A$$ and the semidirect product $$A \rtimes G/V(G)$$ under the induced quotient action is also in $$\mathcal{V}$$. Then, the second cohomology group $$H^2_{\mathcal{V}}(G,A)$$ is defined as the image of $$H^2_{\mathcal{V}}(G/V(G),A)$$ under the map:

$$ H^2(G/V(G),A) \to H^2(G,A)$$

Note that the mapping is injective, so as an abstract group, $$H^2_{\mathcal{V}}(G/V(G),A) \cong H^2_{\mathcal{V}}(G,A)$$.

Particular cases

 * In the case of abelian groups, we must take the action as trivial, and in this case, we get that this group is $$\operatorname{Ext}^1(G,A)$$.