A May 2021 study by the University of Bari said, 

"We aimed to evaluate the response of total testosterone and sex hormone levels to a very low-calorie ketogenic diet in a cohort of overweight or obese non-diabetic male subjects and what we found was that there is a noticeable relation between a specific, controlled diet and insulin action, energy balance, and testicular function,"