In some places, as here in Italy, there are pre-diving courses in the pool called "aquaticity" ot "water confidence".
These do not focus specifically on swimming, which is just one part of the program.
In these courses the focus is to make the student to feel "at home" in water, both at the surface and under. And to get the basis of free diving, first with no equipment, and then using fins, mask and snorkel.
Typically these aquaticity courses are organised by no-profit diving clubs.
Competitive swimming clubs usually hate these courses and speak badly of them, as they steal students from their swimming courses.
Instead I think that these aquaticity courses are great, they create confident people who do not risk to drown in difficult conditions.
I have seen good competitive swimmers to have severe difficulties in a rough sea, as they could not swim head-up, nor thread water carrying a weight.
Here an example of these aquaticity courses (although not the same you find in many pools here in Italy):
Learn ‘Aquaticity’ at Soneva Fushi’s Freediving Courses
Here an Italian course in a local pool here in Parma (use Google Translate, if needed):
www.fiasparma.it