docs: def expect(p, prefixes, confidential=False):
      """Read a line and return it without required prefix."""
      resp = p.stdout.readline()
      log.debug('%s -> %r', p.args, resp if not confidential else '********')
      for prefix in prefixes:
          if resp.startswith(prefix):
              return resp[len(prefix):]
      raise UnexpectedError(resp)