Imho, we should move this import outside the function, but still in the else branch, so just 2 lines up.