def METHOD_NAME(self, scoped):
    env = os.environ.copy()
    if scoped:
        env["LD_PRELOAD"] = self.scope_path
    #logging.info("Sockets before start()")
    #os.system('netstat -an | grep -w 9092')
    #logging.info("ps before start()")
    #os.system('ps -ef')
    logging.info(f"Starting app {self.name} in {'scoped' if scoped else 'unscoped'} mode.")
    start_command = "/kafka/bin/zookeeper-server-start.sh /kafka/config/zookeeper.properties"
    logging.debug(f"Command is {start_command}.")
    self.zookeper = subprocess.Popen(start_command.split(), env=env,
            start_new_session=True, stdout=subprocess.DEVNULL,
            stderr=subprocess.DEVNULL)
    start_command = "/kafka/bin/kafka-server-start.sh /kafka/config/server.properties"
    logging.debug(f"Command is {start_command}.")
    self.server = subprocess.Popen(start_command.split(), env=env,
            start_new_session=True, stdout=subprocess.DEVNULL,
            stderr=subprocess.DEVNULL)
    # wait for the "LISTEN" socket
    timeout = 90
    netstat = subprocess.check_output('netstat -an | grep -w 9092 || true', shell=True)
    while b'LISTEN' not in netstat:
        netstat = subprocess.check_output('netstat -an | grep -w 9092 || true', shell=True)
        time.sleep(1)
        timeout -= 1
        if timeout <= 0:
            logging.info("Giving up waiting for start")
            break
    #logging.info("Sockets after start()")
    #os.system('netstat -an | grep -w 9092')
    #logging.info("ps after start()")
    #os.system('ps -ef')