[blocking] Add compatibility for older version of sklearn, closes #252733 [applied]