def get_next_module_keys(self, run_state: RunState) -> List[str]:
        """Determine the next module keys to run based on the current state."""
        next_module_keys = []

        for module_key, module_input in run_state.all_module_inputs.items():
            if module_key in run_state.executed_modules:
                continue  # Module already executed

            if all(
                key in module_input
                for key in self.module_dict[module_key].free_req_input_keys
            ):
                next_module_keys.append(module_key)

        return next_module_keys
Determine the next module keys to run based on the current state.
llama-index-core/llama_index/core/query_pipeline/query.py