code: func GetChaincodeDeploymentSpec(code []byte, pr *platforms.Registry) (*peer.ChaincodeDeploymentSpec, error) {
  	cds := &peer.ChaincodeDeploymentSpec{}
  	err := proto.Unmarshal(code, cds)
  	if err != nil {
  		return nil, errors.Wrap(err, "error unmarshaling ChaincodeDeploymentSpec")
  	}
  
  	// FAB-2122: Validate the CDS according to platform specific requirements
  	return cds, pr.ValidateDeploymentSpec(cds.CCType(), cds.Bytes())
  }
docs: // GetChaincodeDeploymentSpec returns a ChaincodeDeploymentSpec given args