def METHOD_NAME(circuit, q, c, ancilla, clauses, steps):
    """Generator that performs the inversion over the average step in Grover's search algorithm.
    Args:
        circuit (Circuit): empty quantum circuit onto which the grover algorithm is performed
        q (list): quantum register that encodes the problem.
        c (list): quantum register that that records the satisfies clauses.
        ancilla (int): Grover ancillary qubit.
        clauses (list): list of all clauses, with the qubits each clause acts upon.
        steps (int): number of times the oracle+diffuser operators have to be applied
            in order to find the solution. Grover's search algorihtm dictates O(sqrt(2**qubits)).
    Returns:
        circuit (Circuit): circuit with the full grover algorithm applied.
    """
    circuit.add(start_grover(q, ancilla))
    for i in range(steps):
        circuit.add(oracle(q, c, ancilla, clauses))
        circuit.add(diffusion(q))
    circuit.add(gates.M(*(q), register_name="result"))
    return circuit