Time-series Generation by Contrastive Imitation