special token like !<str> need to be converted to !!str, while writing back we just do it in reverse.
!<str>
!!str
full reference of pyyaml is here