code: func (s *Simulation) UploadSnapshot(ctx context.Context, snapshotFile string, opts ...AddNodeOption) error {
  	f, err := os.Open(snapshotFile)
  	if err != nil {
  		return err
  	}
  
  	jsonbyte, err := ioutil.ReadAll(f)
  	f.Close()
  	if err != nil {
  		return err
  	}
  	var snap simulations.Snapshot
  	if err := json.Unmarshal(jsonbyte, &snap); err != nil {
  		return err
  	}
  
  	//the snapshot probably has the property EnableMsgEvents not set
  	//set it to true (we need this to wait for messages before uploading)
  	for i := range snap.Nodes {
  		snap.Nodes[i].Node.Config.EnableMsgEvents = true
  		snap.Nodes[i].Node.Config.Services = s.serviceNames
  		for _, o := range opts {
  			o(snap.Nodes[i].Node.Config)
  		}
  	}
  
  	if err := s.Net.Load(&snap); err != nil {
  		return err
  	}
  	return s.WaitTillSnapshotRecreated(ctx, &snap)
  }
docs: // UploadSnapshot uploads a snapshot to the simulation
  // This method tries to open the json file provided, applies the config to all nodes
  // and then loads the snapshot into the Simulation network