def METHOD_NAME(
    hilbert: TensorHilbert, rules: tuple[MetropolisRule, ...]
) -> "TensorRule":
    r"""A Metropolis sampling rule that can be used to combine different rules acting
    on different subspaces of the same tensor-hilbert space.
    It should be constructed by passing a `TensorHilbert` space as a first argument
    and a list of rules as a second argument. Each `rule[i]` will be used to generate
    a transition for the `i`-th subspace of the tensor hilbert space.
    Args:
        hilbert: The tensor hilbert space on which the rule acts.
        rules: A list of rules, one for each subspace of the tensor hilbert space.
    """
    if not isinstance(hilbert, TensorHilbert):
        raise TypeError(
            "The Hilbert space of a `CombinedRule` must be a TensorHilbert,"
            "which is constructed as a product of different Hilbert spaces."
        )
    if not isinstance(rules, (tuple, list)) or not all(
        isinstance(r, MetropolisRule) for r in rules
    ):
        raise TypeError(
            "The second argument (rules) must be a tuple of `MetropolisRule` "
            f"rules, but you have passed {type(rules)}."
        )
    if len(hilbert.subspaces) != len(rules):
        raise ValueError(
            "Length mismatch between the rules and the hilbert space: Hilbert "
            f"has {len(hilbert.subspaces)} subpsaces, but you specified {len(rules)}."
        )
    return TensorRule(hilbert, tuple(rules))