Function defineAutomaticFacetGenerator