General formalism for inhomogeneous random graphs | Synapse