1: \begin{abstract}
2: We present a structural description of finite nilpotent groups of class at most $2$ using a specified number of subdirect and central products of $2$-generated such groups.
3: As a corollary, we show that all of these groups are isomorphic to a subgroup of a Heisenberg group satisfying certain properties.
4:
5: The motivation for these results is of topological nature as they can be used
6: to give lower bounds to the nilpotently Jordan property of the birational automorphism group of varieties and the homeomorphism group of compact manifolds.
7: \end{abstract}
8: