code: @SuppressWarnings("unchecked")
    protected VersionSelectionPolicy<DatasetVersion> createSelectionPolicy(Config selectionConfig, Config jobConfig) {
      try {
        String selectionPolicyKey =
            StringUtils.substringAfter(ConfigurableCleanableDataset.SELECTION_POLICY_CLASS_KEY,
                ConfigurableCleanableDataset.CONFIGURATION_KEY_PREFIX);
        Preconditions.checkArgument(selectionConfig.hasPath(selectionPolicyKey));
        String className = selectionConfig.getString(selectionPolicyKey);
        return (VersionSelectionPolicy<DatasetVersion>) GobblinConstructorUtils.invokeFirstConstructor(
            this.versionSelectionAliasResolver.resolveClass(className), ImmutableList.<Object> of(selectionConfig),
            ImmutableList.<Object> of(selectionConfig, ConfigUtils.configToProperties(jobConfig)),
            ImmutableList.<Object> of(ConfigUtils.configToProperties(jobConfig)));
      } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException | InstantiationException
          | ClassNotFoundException e) {
        throw new IllegalArgumentException(e);
      }
    }
docs: /*
  Since {@link VersionSelectionPolicy} does not have a factory to create new objects we need to use the legacy
  pattern of creating new objects using GobblinConstructorUtils