code: def rule_generator(*funcs):
      
      dim = len(funcs)
      tensprod_rule = create_tensorprod_function(funcs)
      assert hasattr(tensprod_rule, "__call__")
  
      mv_rule = create_mv_rule(tensprod_rule, dim)
      assert hasattr(mv_rule, "__call__")
      return mv_rule
docs: Constructor for creating multivariate quadrature generator.
  
      Args:
          funcs (:py:data:typing.Callable):
              One dimensional integration rule where each rule returns
              ``abscissas`` and ``weights`` as one dimensional arrays. They must
              take one positional argument ``order``.
  
      Returns:
          (:py:data:typing.Callable):
              Multidimensional integration quadrature function that takes the
              arguments ``order`` and ``sparse``, and a optional ``part``. The
              argument ``sparse`` is used to select for if Smolyak sparse grid is
              used, and ``part`` defines if subset of rule should be generated
              (for parallelization).
  
      Example:
          >>> clenshaw_curtis = lambda order: chaospy.quad_clenshaw_curtis(
          ...         order, lower=-1, upper=1, growth=True)
          >>> gauss_legendre = lambda order: chaospy.quad_gauss_legendre(
          ...         order, lower=0, upper=1)
          >>> quad_func = chaospy.rule_generator(clenshaw_curtis, gauss_legendre)
          >>> abscissas, weights = quad_func(1)
          >>> print(numpy.around(abscissas, 4))
          [[-1.     -1.      0.      0.      1.      1.    ]
           [ 0.2113  0.7887  0.2113  0.7887  0.2113  0.7887]]
          >>> print(numpy.around(weights, 4))
          [0.1667 0.1667 0.6667 0.6667 0.1667 0.1667]