code: func NewFromSnapshot(snap *api.RangeAllocation) (*PortAllocator, error) {
  	pr, err := net.ParsePortRange(snap.Range)
  	if err != nil {
  		return nil, err
  	}
  	r := NewPortAllocator(*pr)
  	if err := r.Restore(*pr, snap.Data); err != nil {
  		return nil, err
  	}
  	return r, nil
  }
docs: // NewFromSnapshot allocates a PortAllocator and initializes it from a snapshot.