code: func GetLastConfigFromBlock(block *common.Block) (*common.LastConfig, error) {
  	if block.Metadata == nil {
  		return nil, errors.New("block metadata is nil")
  	}
  	metadata := &common.Metadata{}
  	err := proto.Unmarshal(block.Metadata.Metadata[common.BlockMetadataIndex_LAST_CONFIG], metadata)
  	if err != nil {
  		return nil, errors.Wrap(err, "unmarshal block metadata failed")
  	}
  
  	lastConfig := &common.LastConfig{}
  	err = proto.Unmarshal(metadata.Value, lastConfig)
  	if err != nil {
  		return nil, errors.Wrap(err, "unmarshal last config from metadata failed")
  	}
  
  	return lastConfig, err
  }
docs: // GetLastConfigFromBlock returns the LastConfig data from the given block