code: def getpass_echo(prompt="Password", stream=None):
      """Q&D workaround until we have proper 'centralized' UI -- just use getpass BUT enable echo"""
      if on_windows:
          # Can't do anything fancy yet, so just ask the one without echo
          return getpass.getpass(prompt=prompt, stream=stream)
      else:
          # We can mock patch termios so that ECHO is not turned OFF.
          # Side-effect -- additional empty line is printed
  
          # def _no_emptyline_write(out):
          #     # Additional mock to prevent not needed empty line print since we do have echo
          #     # doesn't work since we don't know the stream here really
          #     if out == '\n':
          #         return
          #     stream.write(out)
          from unittest.mock import patch
  
          with patch("termios.ECHO", 255**2):
              # patch.object(stream, 'write', _no_emptyline_write(stream)):
              return getpass.getpass(prompt=prompt, stream=stream)
  
imports: from logging import getLogger
  import os
  import sys
  import time
  import getpass
  from collections import deque
  from copy import copy
  from ..utils import auto_repr
  from ..utils import on_windows
  from .base import InteractiveUI
  from datalad.support.exceptions import CapturedException
label_desc: Use image node_id 1 for calling a global function with example usage: getpass_echo(prompt, stream) and returns: getpass, getpass