code: def test_Module_submodule_from_gens():
      T = Poly(cyclotomic_poly(5, x))
      A = PowerBasis(T)
      gens = [2 * A(0), 2 * A(1), 6 * A(0), 6 * A(1)]
      B = A.submodule_from_gens(gens)
      # Because the 3rd and 4th generators do not add anything new, we expect
      # the cols of the matrix of B to just reproduce the first two gens:
      M = gens[0].column().hstack(gens[1].column())
      assert B.matrix == M
      # At least one generator must be provided:
      raises(ValueError, lambda: A.submodule_from_gens([]))
      # All generators must belong to A:
      raises(
          ValueError, lambda: A.submodule_from_gens([3 * A(0), B(0)])
      )
  
imports: from sympy.abc import x, zeta
  from sympy.polys import Poly, cyclotomic_poly
  from sympy.polys.domains import FF, QQ, ZZ
  from sympy.polys.matrices import DomainMatrix, DM
  from sympy.polys.numberfields.exceptions import ClosureFailure, MissingUnityError, StructureError
  from sympy.polys.numberfields.modules import Module, ModuleElement, ModuleEndomorphism, PowerBasis, PowerBasisElement, find_min_poly, is_sq_maxrank_HNF, make_mod_elt, to_col
  from sympy.polys.numberfields.utilities import is_int
  from sympy.polys.polyerrors import UnificationFailed
  from sympy.testing.pytest import raises
label_desc: Use image node_id 11 for calling a global function with example usage: test_Module_submodule_from_gens() without return types