code: def _make_cached_stream_func(src_func, wrapper_func):
      cache = WeakKeyDictionary()
  
      def func():
          stream = src_func()
          try:
              rv = cache.get(stream)
          except Exception:
              rv = None
          if rv is not None:
              return rv
          rv = wrapper_func()
          try:
              stream = (
                  src_func()
              )  # In case wrapper_func() modified the stream
              cache[stream] = rv
          except Exception:
              pass
          return rv
  
      return func
  
imports: import codecs
  import io
  import os
  import re
  import sys
  from weakref import WeakKeyDictionary
label_desc: Use image node_id 13 for calling a global function with example usage: _make_cached_stream_func(src_func, wrapper_func) and returns: func, rv, rv