def METHOD_NAME(varnames, seed=0):
    """Generate random parameters to help construct Cirq test gates"""
    np.random.seed(seed)
    params = {}
    # Generating angles
    for ra in ["rads", "theta", "phi"]:
        if ra in varnames:
            params[ra] = np.random.rand() * 2 * np.pi
    # Generating probabilities
    for prob in ["gamma", "p", "probability"]:
        if prob in varnames:
            params[prob] = np.random.rand()
    # exponents
    for exp in ["exponent", "x_exponent", "z_exponent", "phase_exponent", "axis_phase_exponent"]:
        if exp in varnames:
            params[exp] = np.random.rand() * 10
    if "num_qubits" in varnames:
        params["num_qubits"] = np.random.randint(1, 7)
    if "sub_gate" in varnames:
        params["sub_gate"] = np.random.choice([cirq.X, cirq.Y, cirq.Z, cirq.S, cirq.T])
    if "matrix" in varnames:
        n = np.random.randint(1, 4)
        params["matrix"] = scipy.stats.unitary_group.rvs(2**n)
    return params