Add specs of Sequence #duplicate and #to_hash methods

[#55911802]
Implement Sequence #to_hash and #duplicate methods

[#55911802]