class_docstr: UI to help with testing functionality requiring interaction
  
  It will provide additional method to push responses to be provided,
  and could be used as a context manager
class_docstr_tok: ["UI","to","help","with","testing","functionality","requiring","interaction","It","will","provide","additional","method","to","push","responses","to","be","provided",",","and","could","be","used","as","a","context","manager"]
code: def __exit__(self, exc_type, exc_val, exc_tb):
      responses = copy(self._responses)
      # we should clear the state so there is no side-effect
      self.clear_responses()
      assert not len(
          responses
      ), "Still have some responses left: %s" % repr(self._responses)
  
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 7 for calling the UnderTestsUI obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) without return types