<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rule_generator(*funcs):
 """ 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: [[-1. -1. 0. 0. 1. 1. ] [ 0.2113 0.7887 0.2113 0.7887 0.2113 0.7887]] [0.1667 0.1667 0.6667 0.6667 0.1667 0.1667] """

    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