code: private boolean affectsTarget(List<Integer> targetIds, int currentId) {
      return targetIds == null || targetIds.isEmpty() || targetIds.contains(currentId);
    }
docs: Checks if the current target id is included in the list of target ids. Returns true if no
  targetIds are provided.