public static Set<Container> getDeprecatedContainers(AccountService accountService,
      long containerDeletionRetentionDays) {
    Set<Container> deprecatedContainers = new HashSet<>();
    accountService.getContainersByStatus(Container.ContainerStatus.DELETE_IN_PROGRESS).forEach((container) -> {
      if (container.getDeleteTriggerTime() + TimeUnit.DAYS.toMillis(containerDeletionRetentionDays)
          <= System.currentTimeMillis()) {
        deprecatedContainers.add(container);
      }
    });
    deprecatedContainers.addAll(accountService.getContainersByStatus(Container.ContainerStatus.INACTIVE));
    return deprecatedContainers;
  }
Returns {@link Set} of deprecated {@link Container}s ready for deletion from {@link AccountService}.
@param accountService {@link AccountService} object.
@param containerDeletionRetentionDays Number of days upto which deprecated containers can be marked as ACTIVE.
@return {@link Set} of deprecated {@link Container}s.
ambry-account/src/main/java/com/github/ambry/account/AccountUtils.java