code: func GetMetadataFromBlock(block *cb.Block, index cb.BlockMetadataIndex) (*cb.Metadata, error) {
  	md := &cb.Metadata{}
  	err := proto.Unmarshal(block.Metadata.Metadata[index], md)
  	if err != nil {
  		return nil, errors.Wrapf(err, "error unmarshaling metadata from block at index [%s]", index)
  	}
  	return md, nil
  }
docs: // GetMetadataFromBlock retrieves metadata at the specified index.