You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_templates.rs
    path of file: ./repos/snarkVM/algorithms/src/polycommit
    
    the code of the file until where you have to start completion: // Copyright (C) 2019-2023 Aleo Systems Inc.
// This file is part of the snarkVM library.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use super::sonic_pc::{
    BatchLCProof,
    BatchProof,
    Commitment,
    CommitterUnionKey,
    Evaluations,
    LabeledCommitment,
    QuerySet,
    Randomness,
    SonicKZG10,
};
use crate::{
    fft::DensePolynomial,
    polycommit::{
        sonic_pc::{LabeledPolynomial, LabeledPolynomialWithBasis, LinearCombination},
        PCError,
    },
    srs::UniversalVerifier,
    AlgebraicSponge,
};
use snarkvm_curves::PairingEngine;
use snarkvm_fields::{One, Zero};
use snarkvm_utilities::rand::{TestRng, Uniform};

use itertools::Itertools;
use rand::{
    distributions::{self, Distribution},
    Rng,
};
use std::marker::PhantomData;

#[derive(Default)]
struct TestInfo {
    num_iters: usize,
  
    
pub fn bad_degree_bound_test<E: PairingEngine, S: AlgebraicSponge<E::Fq, 2>>() -> Result<(), PCError> {
    let rng = &mut TestRng::default();
    let max_degree = 100;
    let pp = SonicKZG10::<E, S>::load_srs(max_degree)?;
    let universal_prover = &pp.to_universal_prover().unwrap();

    for _ in 0..10 {
        let supported_degree = distributions::Uniform::from(1..=max_degree).sample(rng);
        assert!(max_degree >= supported_degree, "max_degree < supported_degree");

        let mut labels = Vec::new();
        let mut polynomials = Vec::new();
        let mut degree_bounds = Vec::new();

        for i in 0..10 {
            let label = format!("Test{i}");
            labels.push(label.clone());
            let poly = DensePolynomial::rand(supported_degree, rng);

            let degree_bound = 1usize;
            let hiding_bound = Some(1);
            degree_bounds.push(degree_bound);

            polynomials.push(LabeledPolynomial::new(label, poly, Some(degree_bound), hiding_bound))
        }

        println!("supported degree: {supported_degree:?}");
        let (ck, vk) =
            SonicKZG10::<E, S>::trim(&pp, supported_degree, None, supported_degree, Some(degree_bounds.as_slice()))
                .unwrap();
        println!("Trimmed");

        let ck = CommitterUnionKey::union(std::iter::once(&ck));

        let (comms, rands) =
            SonicKZG10::<E, S>::commit(universal_prover, &ck, polynomials.iter().map(Into::into), Some(rng))?;

        let mut query_set = QuerySet::new();
        let mut values = Evaluations::new();
        let point = E::Fr::rand(rng);
        for (i, label) in labels.iter().enumerate() {
            query_set.insert((label.clone(), ("rand".into(), point)));
            let value = polynomials[i].evaluate(point);
            values.insert((label.clone(), point), value);
        }
        println!("Generated query set");

        let mut sponge_for_open = S::new();
        let proof = SonicKZG10::batch_open(
            universal_prover,
            &ck,
            polynomials.iter(),
            &query_set,
            rands.iter(),
            &mut sponge_for_open,
        )?;
        let mut sponge_for_check = S::new();
        let result = SonicKZG10::batch_check(&vk, &comms, &query_set, &values, &proof, &mut sponge_for_check)?;
        assert!(result, "proof was incorrect, Query set: {query_set:#?}");
    }
    Ok(())
}