γ -ray strength function for barium isotopes