code: func (m *Mgr) HandleChaincodeInstall(chaincodeDefinition *ChaincodeDefinition, dbArtifacts []byte) error {
  	logger.Debugf("HandleChaincodeInstall() - chaincodeDefinition=%#v", chaincodeDefinition)
  	// Write lock prevents concurrent deploy operations
  	m.rwlock.Lock()
  	for chainid := range m.ccLifecycleListeners {
  		logger.Debugf("Channel [%s]: Handling chaincode install event for chaincode [%s]", chainid, chaincodeDefinition)
  		var deployedCCInfo *ledger.DeployedChaincodeInfo
  		var err error
  		if deployedCCInfo, err = m.infoProvider.GetDeployedChaincodeInfo(chainid, chaincodeDefinition); err != nil {
  			logger.Warningf("Channel [%s]: Error while getting the deployment status of chaincode: %s", chainid, err)
  			return err
  		}
  		if deployedCCInfo == nil {
  			logger.Debugf("Channel [%s]: Chaincode [%s] is not deployed on channel hence not creating chaincode artifacts.",
  				chainid, chaincodeDefinition)
  			continue
  		}
  		m.callbackStatus.setInstallPending(chainid)
  		chaincodeDefinition.CollectionConfigs = deployedCCInfo.CollectionConfigPkg
  		if err := m.invokeHandler(chainid, chaincodeDefinition, dbArtifacts); err != nil {
  			logger.Warningf("Channel [%s]: Error while invoking a listener for handling chaincode install event: %s", chainid, err)
  			return err
  		}
  		logger.Debugf("Channel [%s]: Handled chaincode install event for chaincode [%s]", chainid, chaincodeDefinition)
  	}
  	return nil
  }
docs: // HandleChaincodeInstall is expected to get invoked during installation of a chaincode package