def METHOD_NAME(flat, list_type):
    """Test converting pytket gates to matrix"""
    c = TKCircuit(10, 2, name="example")
    c.CU1(np.pi / 2, 2, 3)
    c_unitary = _gate_to_matrix_pytket(
        gates=c.get_commands()[0] if list_type else c.get_commands(), flat=flat
    )
    if flat:
        assert c_unitary.shape[0] == 2**2
    else:
        assert c_unitary.shape[0] == 2**4