Many types of global anomalies must cancel for a theory to be consistent. An example is modular invariance, the requirement of anomaly cancellation for a part of a gravitational anomaly that deals with the large diffeomorphisms over two dimensional worldsheets of genus 1 or more.