code: func (m *SignedGossipMessage) Sign(signer Signer) (*Envelope, error) {
  	// If we have a secretEnvelope, don't override it.
  	// Back it up, and restore it later
  	var secretEnvelope *SecretEnvelope
  	if m.Envelope != nil {
  		secretEnvelope = m.Envelope.SecretEnvelope
  	}
  	m.Envelope = nil
  	payload, err := proto.Marshal(m.GossipMessage)
  	if err != nil {
  		return nil, err
  	}
  	sig, err := signer(payload)
  	if err != nil {
  		return nil, err
  	}
  
  	e := &Envelope{
  		Payload:        payload,
  		Signature:      sig,
  		SecretEnvelope: secretEnvelope,
  	}
  	m.Envelope = e
  	return e, nil
  }
docs: // Sign signs a GossipMessage with given Signer.
  // Returns an Envelope on success,
  // panics on failure.