code: def typein(chars: str = "y"):
      # typein chars to input stream
      with generate_tempfile(mode="w+") as _stream:
          with redirect_istream(_stream):
              _stream.write("{}\n".format(chars))
              _stream.seek(0)
              yield
  
file_path: PaddleHub/paddlehub/utils/io.py
imports: import contextlib
  import sys
  from typing import IO
  from paddlehub.utils.utils import generate_tempfile
label_desc: Use image node_id 5 for calling a global function with example usage: typein(chars) without return types