For diatomic homo- and hetero-nuclear molecules with both atoms having Z > 8, oxygen and after, the MO diagram is as follow: sigma 2s, sigma 2s*, sigma 2pz, pi2px and pi2py (degenerate), pi2px* and pi2py* (degenerate), sigma 2pz*, as you have it in your notes. There is symmetry, so sigma 2pz and sigma 2pz* are respectively the lowest and highest energy levels among these orbitals (sigma 2pz, pi2px and pi2py, pi2px* and pi2py*, sigma 2pz*). And pi2px, pi2py, and pi2px*, pi2py* are in the middle. For diatomic homo-nuclear molecules with Z<8 nitrogen and before, and for diatomic hetero-nuclear molecules with one or both atoms with Z<8 the MO diagram has one difference. The energy levels of sigma 2pz and pi2px and pi2py are switched, meaning that for these cases the pi2px and pi2py (degenerate) are lower than sigma 2pz. The anti bonding orbitals are not switched. This switch in energy level is because of interference between sigma 2s* and sigma 2pz.