code: def test_stream_source():
      s = Stream.source(range(10))
  
      assert s.forward() == 0
      assert s.forward() == 1
  
      s.reset()
  
      assert s.forward() == 0
      assert s.forward() == 1
  
      def g():
          done = False
          i = 0
          yield i
  
          while not done:
              i += 1
              yield i
  
      s = Stream.source(g)
  
      assert s.forward() == 0
      assert s.forward() == 1
  
      s.reset()
  
      assert s.forward() == 0
      assert s.forward() == 1
  
file_path: tensortrade/tests/tensortrade/unit/feed/core/test_base.py
imports: from tensortrade.feed.core import Stream, NameSpace
  from tensortrade.feed.core.base import Placeholder
label_desc: Use image node_id 3 for calling a global function with example usage: test_stream_source() without return types