def executeWithTimeout(self, command, timeout):
        self.process = None

        def target():
            os.umask(2)
            self.process = subprocess.Popen(command, stderr=subprocess.STDOUT, shell=True)
            self.process.communicate()

        thread = threading.Thread(target=target)
        thread.start()
        retcode = thread.join(timeout)

        if thread.is_alive():
            self.process.terminate()
            thread.join()
            raise TimeoutError("Execution has taken more than allowed time (timeout=%ds)" % timeout)

        return retcode
initialize a json location tree for drill-down controls on
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/puliclient/runner.py/RunnerToolkit.executeWithTimeout--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/locations/util.py/load_locs_json