protected function deletePromotions(array $types, array $validIDs = []) {
    $query = $this->nodeStorage->getQuery();
    $query->condition('type', 'acm_promotion');
    $query->condition('field_acm_promotion_type', $types, 'IN');

    if ($validIDs) {
      $query->condition('field_acm_promotion_rule_id', $validIDs, 'NOT IN');
    }

    $nids = $query->execute();

    foreach ($nids as $nid) {
      /* @var $node \Drupal\node\NodeInterface */
      $node = $this->nodeStorage->load($nid);
      if ($node instanceof NodeInterface) {
        $node->delete();
        $this->logger->notice('Deleted orphan promotion node @promotion having rule_id:@rule_id.', [
          '@promotion' => $node->label(),
          '@rule_id' => $node->get('field_acm_promotion_rule_id')->first()->getString(),
        ]);
      }
    }
  }