private void ensureDataSourceInitialized() {
      if (mFinishedDataSources != null) {
        return;
      }

      synchronized (IncreasingQualityDataSource.this) {
        if (mFinishedDataSources == null) {
          mFinishedDataSources = new AtomicInteger(0);
          final int n = mDataSourceSuppliers.size();
          mNumberOfDataSources = n;
          mIndexOfDataSourceWithResult = n;
          mDataSources = new ArrayList<>(n);
          for (int i = 0; i < n; i++) {
            DataSource<T> dataSource = mDataSourceSuppliers.get(i).get();
            mDataSources.add(dataSource);
            dataSource.subscribe(new InternalDataSubscriber(i), CallerThreadExecutor.getInstance());
            // there's no point in creating data sources of lower quality
            // if the data source of a higher quality has some result already
            if (dataSource.hasResult()) {
              break;
            }
          }
        }
      }
    }
Creates a new data source supplier with increasing-quality strategy with optional lazy state
creation.

<p>Note: for performance reasons the list doesn't get cloned, so the caller of this method
should not modify the list once passed in here.

@param dataSourceSuppliers list of underlying suppliers
@param dataSourceLazy if true, the state of data source would be created only if necessary
fbcore/src/main/java/com/facebook/datasource/IncreasingQualityDataSourceSupplier.java