docs: def InjectString(self, codestring, wait_for_completion=True):
      """Try to inject python code into current thread.
  
      Args:
        codestring: Python snippet to execute in inferior. (may contain newlines)
        wait_for_completion: Block until execution of snippet has completed.
      """
      if self.inferior.is_running and self.inferior.gdb.IsAttached():
        try:
          self.inferior.gdb.InjectString(
              self.inferior.position,
              codestring,
              wait_for_completion=wait_for_completion)
        except RuntimeError:
          exc_type, exc_value, exc_traceback = sys.exc_info()
          traceback.print_exception(exc_type, exc_value, exc_traceback)
      else:
        logging.error('Not attached to any process.')