code: func (s *Restore) Session(sess *structs.Session) error {
  	// Insert the session.
  	if err := s.tx.Insert("sessions", sess); err != nil {
  		return fmt.Errorf("failed inserting session: %s", err)
  	}
  
  	// Insert the check mappings.
  	for _, checkID := range sess.Checks {
  		mapping := &sessionCheck{
  			Node:    sess.Node,
  			CheckID: checkID,
  			Session: sess.ID,
  		}
  		if err := s.tx.Insert("session_checks", mapping); err != nil {
  			return fmt.Errorf("failed inserting session check mapping: %s", err)
  		}
  	}
  
  	// Update the index.
  	if err := indexUpdateMaxTxn(s.tx, sess.ModifyIndex, "sessions"); err != nil {
  		return fmt.Errorf("failed updating index: %s", err)
  	}
  
  	return nil
  }
docs: // Session is used when restoring from a snapshot. For general inserts, use
  // SessionCreate.