Coding stream.py

convert stream to node object