code: func ExtractStatedbArtifactsForChaincode(ccname, ccversion string, pr *platforms.Registry) (installed bool, statedbArtifactsTar []byte, err error) {
  	ccpackage, err := GetChaincodeFromFS(ccname, ccversion)
  	if err != nil {
  		// TODO for now, we assume that an error indicates that the chaincode is not installed on the peer.
  		// However, we need a way to differentiate between the 'not installed' and a general error so that on general error,
  		// we can abort the chaincode instantiate/upgrade/install operation.
  		ccproviderLogger.Infof("Error while loading installation package for ccname=%s, ccversion=%s. Err=%s", ccname, ccversion, err)
  		return false, nil, nil
  	}
  
  	statedbArtifactsTar, err = ExtractStatedbArtifactsFromCCPackage(ccpackage, pr)
  	return true, statedbArtifactsTar, err
  }
docs: // ExtractStatedbArtifactsAsTarbytes extracts the statedb artifacts from the code package tar and create a statedb artifact tar.
  // The state db artifacts are expected to contain state db specific artifacts such as index specification in the case of couchdb.
  // This function is intented to be used during chaincode instantiate/upgrade so that statedb artifacts can be created.