def METHOD_NAME():
    qubits = cirq.LineQubit.range(2)
    circuit = cirq.Circuit(cirq.Z(qubits[0]), cirq.X(qubits[1]))
    no_noise_simulator = cirq.DensityMatrixSimulator()
    for n_measured_operators in [1, 2, 3, 4, None]:
        estimated_fidelity, _ = dfe.direct_fidelity_estimation(
            circuit,
            qubits,
            no_noise_simulator,
            n_measured_operators=n_measured_operators,
            samples_per_term=0,
        )
        assert np.isclose(estimated_fidelity, 1.0, atol=0.01)