Tutorial: Computing Topological Invariants in 2D Photonic Crystals