def orbit_decomposition(L, cyc_act):
    """
    Return the orbit decomposition of ``L`` by the action of ``cyc_act``.

    INPUT:

    - ``L`` -- list

    - ``cyc_act`` -- bijective function from ``L`` to ``L``

    OUTPUT:

    - a list of lists, the orbits under the cyc_act acting on ``L``

    EXAMPLES::

        sage: from sage.combinat.cyclic_sieving_phenomenon import *
        sage: S42 = Subsets([1,2,3,4], 2); S42
        Subsets of {1, 2, 3, 4} of size 2
        sage: def cyc_act(S): return Set(i.mod(4) + 1 for i in S)
        sage: cyc_act([1,3])
        {2, 4}
        sage: cyc_act([1,4])
        {1, 2}
        sage: orbits = orbit_decomposition(S42, cyc_act)
        sage: sorted([sorted(orb, key=sorted) for orb in orbits], key=len)
        [[{1, 3}, {2, 4}], [{1, 2}, {1, 4}, {2, 3}, {3, 4}]]
    """
    orbits = []
    L_prime = set(L)
    while L_prime != set():
        obj = L_prime.pop()
        orbit = [obj]
        obj = cyc_act(obj)
        while obj in L_prime:
            orbit.append(obj)
            L_prime.remove(obj)
            obj = cyc_act(obj)
        orbits.append(orbit)
    return orbits