code: public static Evaluator endAndTerminatorNodeEvaluator(List<Node> endNodes, List<Node> terminatorNodes) {
          Evaluator endNodeEvaluator = null;
          Evaluator terminatorNodeEvaluator = null;
  
          if (!endNodes.isEmpty()) {
              Node[] nodes = endNodes.toArray(new Node[endNodes.size()]);
              endNodeEvaluator = Evaluators.includeWhereEndNodeIs(nodes);
          }
  
          if (!terminatorNodes.isEmpty()) {
              Node[] nodes = terminatorNodes.toArray(new Node[terminatorNodes.size()]);
              terminatorNodeEvaluator = Evaluators.pruneWhereEndNodeIs(nodes);
          }
  
          if (endNodeEvaluator != null || terminatorNodeEvaluator != null) {
              return new EndAndTerminatorNodeEvaluator(endNodeEvaluator, terminatorNodeEvaluator);
          }
  
          return null;
      }
docs: Returns an evaluator which handles end nodes and terminator nodes
  Returns null if both lists are empty