The try..except isn't really adding anything as a lazy import. If it were at the module level it would be necessary, but inside the function it can just import it or fail.