private void importLabels(
      TokensAndUrlAuthData authData,
      IdempotentImportExecutor idempotentExecutor,
      Supplier<Map<String, String>> allDestinationLabels,
      Collection<MailContainerModel> folders) throws Exception {
    for (MailContainerModel mailContainerModel : folders) {
      Preconditions.checkArgument(!Strings.isNullOrEmpty(mailContainerModel.getName()));
      String exportedLabelName = mailContainerModel.getName();
      idempotentExecutor.executeAndSwallowIOExceptions(
          exportedLabelName,
          "Label - " + exportedLabelName,
          () -> {
            String importerLabelId = allDestinationLabels.get().get(mailContainerModel.getName());
            if (importerLabelId == null) {
              importerLabelId = createImportedLabelId(authData, mailContainerModel.getName());
            }
            return importerLabelId;
          });
      }
  }
Creates a label in the import account, if it doesn't already exist, for all {@code folders} .
extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/mail/GoogleMailImporter.java