code: func OwnerCreateSignedCCDepSpec(cds *peer.ChaincodeDeploymentSpec, instPolicy *common.SignaturePolicyEnvelope, owner msp.SigningIdentity) (*common.Envelope, error) {
  	if cds == nil {
  		return nil, fmt.Errorf("invalid chaincode deployment spec")
  	}
  
  	if instPolicy == nil {
  		return nil, fmt.Errorf("must provide an instantiation policy")
  	}
  
  	cdsbytes := utils.MarshalOrPanic(cds)
  
  	instpolicybytes := utils.MarshalOrPanic(instPolicy)
  
  	var endorsements []*peer.Endorsement
  	//it is not mandatory (at this utils level) to have a signature
  	//this is especially convenient during dev/test
  	//it may be necessary to enforce it via a policy at a higher level
  	if owner != nil {
  		// serialize the signing identity
  		endorser, err := owner.Serialize()
  		if err != nil {
  			return nil, fmt.Errorf("Could not serialize the signing identity for %s, err %s", owner.GetIdentifier(), err)
  		}
  
  		// sign the concatenation of cds, instpolicy and the serialized endorser identity with this endorser's key
  		signature, err := owner.Sign(append(cdsbytes, append(instpolicybytes, endorser...)...))
  		if err != nil {
  			return nil, fmt.Errorf("Could not sign the ccpackage, err %s", err)
  		}
  
  		// each owner starts off the endorsements with one element. All such endorsed
  		// packages will be collected in a final package by CreateSignedCCDepSpecForInstall
  		// when endorsements will have all the entries
  		endorsements = make([]*peer.Endorsement, 1)
  
  		endorsements[0] = &peer.Endorsement{Signature: signature, Endorser: endorser}
  	}
  
  	return createSignedCCDepSpec(cdsbytes, instpolicybytes, endorsements)
  }
docs: // OwnerCreateSignedCCDepSpec creates a package from a ChaincodeDeploymentSpec and
  // optionally endorses it