A semiclassical inversion procedure for the dipole‐moment function for diatomic molecules