as_sequence function

Extract the sequence encoded by a node