code: @Nullable
    CompiledTemplate.Factory selectDelTemplate(
        String delTemplateName, String variant, Predicate<String> activeDelPackageSelector) {
      TemplateData selectedTemplate =
          selector.selectTemplate(delTemplateName, variant, activeDelPackageSelector);
      if (selectedTemplate == null) {
        return null;
      }
      if (selectedTemplate.factory == null) {
        throw new IllegalArgumentException(
            "cannot get a factory for the private template: " + selectedTemplate.soyTemplateName());
      }
      return selectedTemplate.factory;
    }
docs: Returns an active delegate for the given name, variant and active package selector.