code: func NewBundleFromEnvelope(env *cb.Envelope) (*Bundle, error) {
  	payload, err := utils.UnmarshalPayload(env.Payload)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to unmarshal payload from envelope")
  	}
  
  	configEnvelope, err := configtx.UnmarshalConfigEnvelope(payload.Data)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to unmarshal config envelope from payload")
  	}
  
  	if payload.Header == nil {
  		return nil, errors.Errorf("envelope header cannot be nil")
  	}
  
  	chdr, err := utils.UnmarshalChannelHeader(payload.Header.ChannelHeader)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to unmarshal channel header")
  	}
  
  	return NewBundle(chdr.ChannelId, configEnvelope.Config)
  }
docs: // NewBundleFromEnvelope wraps the NewBundle function, extracting the needed
  // information from a full configtx