code: func NewCommonStorageDBProvider(bookkeeperProvider bookkeeping.Provider, metricsProvider metrics.Provider, healthCheckRegistry ledger.HealthCheckRegistry) (DBProvider, error) {
  	var vdbProvider statedb.VersionedDBProvider
  	var err error
  	if ledgerconfig.IsCouchDBEnabled() {
  		if vdbProvider, err = statecouchdb.NewVersionedDBProvider(metricsProvider); err != nil {
  			return nil, err
  		}
  	} else {
  		vdbProvider = stateleveldb.NewVersionedDBProvider()
  	}
  
  	dbProvider := &CommonStorageDBProvider{vdbProvider, healthCheckRegistry, bookkeeperProvider}
  
  	err = dbProvider.RegisterHealthChecker()
  	if err != nil {
  		return nil, err
  	}
  
  	return dbProvider, nil
  }
docs: // NewCommonStorageDBProvider constructs an instance of DBProvider