def METHOD_NAME(selection_bitsize, target_bitsize, target_gate):
    gate = cirq_ft.SelectedMajoranaFermionGate(
        cirq_ft.SelectionRegisters(
            [cirq_ft.SelectionRegister('selection', selection_bitsize, target_bitsize)]
        ),
        target_gate=target_gate,
    )
    g = cirq_ft.testing.GateHelper(gate)
    assert len(g.all_qubits) <= gate.registers.total_bits() + selection_bitsize + 1
    sim = cirq.Simulator(dtype=np.complex128)
    for n in range(target_bitsize):
        # Initial qubit values
        qubit_vals = {q: 0 for q in g.operation.qubits}
        # All controls 'on' to activate circuit
        qubit_vals.update({c: 1 for c in g.quregs['control']})
        # Set selection according to `n`
        qubit_vals.update(zip(g.quregs['selection'], iter_bits(n, selection_bitsize)))
        initial_state = [qubit_vals[x] for x in g.operation.qubits]
        result = sim.simulate(
            g.circuit, initial_state=initial_state, qubit_order=g.operation.qubits
        )
        final_target_state = cirq.sub_state_vector(
            result.final_state_vector,
            keep_indices=[g.operation.qubits.index(q) for q in g.quregs['target']],
        )
        expected_target_state = cirq.Circuit(
            [cirq.Z(q) for q in g.quregs['target'][:n]],
            target_gate(g.quregs['target'][n]),
            [cirq.I(q) for q in g.quregs['target'][n + 1 :]],
        ).final_state_vector(qubit_order=g.quregs['target'])
        cirq.testing.assert_allclose_up_to_global_phase(
            expected_target_state, final_target_state, atol=1e-6
        )