Document read_from_sequence and add a unit test for it