Matching of time-varying labeled graphs