<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calculate_iI_correspondence(omega):
 r"""Get the correspondance between degenerate and nondegenerate schemes."""

    Ne = len(omega[0])
    om = omega[0][0]
    correspondence = []
    I = 0
    for i in range(Ne):
        if omega[i][0] != om:
            om = omega[i][0]
            I += 1
        correspondence += [(i+1, I+1)]
    Nnd = I+1

    def I_nd(i):
        return correspondence[i-1][1]

    def i_d(I):
        for i in range(Ne):
            if correspondence[i][1] == I:
                return correspondence[i][0]

    return i_d, I_nd, Nnd