Create two methods, to_formats and from_formats, that collect the respective to and from formats.