code: func ExtractEnvelope(block *cb.Block, index int) (*cb.Envelope, error) {
  	if block.Data == nil {
  		return nil, errors.New("block data is nil")
  	}
  
  	envelopeCount := len(block.Data.Data)
  	if index < 0 || index >= envelopeCount {
  		return nil, errors.New("envelope index out of bounds")
  	}
  	marshaledEnvelope := block.Data.Data[index]
  	envelope, err := GetEnvelopeFromBlock(marshaledEnvelope)
  	err = errors.WithMessage(err, fmt.Sprintf("block data does not carry an envelope at index %d", index))
  	return envelope, err
  }
docs: // ExtractEnvelope retrieves the requested envelope from a given block and
  // unmarshals it