code: def save_experiment(self, name, variants):
          
          try:
              model.Experiment(
                  name=name,
                  started_on=datetime.utcnow(),
                  variants=[
                      model.Variant(name=v, order=i)
                      for i, v in enumerate(variants)
                  ]
              )
              self.Session.commit()
          finally:
              self.Session.close()
docs: Persist an experiment and its variants (unless they already exist).
  
          :param name a unique string name for the experiment
          :param variants a list of strings, each with a unique variant name