def METHOD_NAME(self, prompt, ident, parent, password=False):
    # Flush output before making the request.
    self.raw_input_str = None
    sys.stderr.flush()
    sys.stdout.flush()
    # Send the input request.
    content = json_clean(dict(prompt=prompt, password=password))
    msg = self.session.msg("input_request", content, parent)
    for frontend in self.frontends:
        if frontend.session.session == parent["header"]["session"]:
            frontend.stdin_channel.call_handlers(msg)
            break
    else:
        logging.error("No frontend found for raw_input request")
        return ""
    # Await a response.
    while self.raw_input_str is None:
        frontend.stdin_channel.process_events()
    return self.raw_input_str