def do_action_generate_ost_step(self, node, parent_is_subquestion=False):
        """
        For current state, propose one-step thought, return legal action portion
        Args:
            parent_is_subquestion:

        Returns:

        """
        if self.print_log:
            print(f"---- Generating one-step thought steps for node ...")

        #! ACTION: generate one-step thought step
        ost_step_list = []
        # formating
        if parent_is_subquestion:
            raise NotImplementedError  # this branche seems unreachable
            # existing_ost_steps, next_ost_step_id = concat_subqs_subas_as_ost_steps(solution_trace)
        else:
            existing_ost_steps, next_ost_step_id = concat_ost_steps(node.solution_trace)

        io_input = (
            self.fewshot_ost_config["prompt_template"].format(
                examples=(
                    self.fewshot_ost_prompt
                    if not node.paraphrased
                    else self.fewshot_ost_prompt_rephrased
                ),
                instruction=node.user_question,
            )
            + existing_ost_steps
            + f"Step {next_ost_step_id}:"
        )
        # breakpoint()
        io_output = self.llm_gen_fn(
            input_str=io_input,
            config=LMCallingConfig(
                n=self.num_a1_steps,
                stop_str=["\n", "\n\n"],  # check stopping token
                include_stop_str_in_output=True,
                max_new_tokens=self.ost_new_tokens,
                **self.gen_cfg,
            ),
        )
        ost_step_list = [io_output.strip() for io_output in io_output.text]
        self.total_api_call_completion += io_output.completion_tokens
        self.total_tree_completion += sum(
            io_output.num_tokens
        )  # incase of action post-processing

        potential_answers_list = [None] * len(ost_step_list)

        for ost_step, potential_answers in zip(ost_step_list, potential_answers_list):
            node.children.append(
                RstarLanguageNode(
                    id=self.node_counter.count(),
                    parent=node,  # TODO[yan]: check over-nesting
                    depth=node.depth + 1,
                    node_type=Node_Type.OST_STEP,
                    ost_step=ost_step,
                )
            )

        return

        For current state, propose one-step thought, return legal action portion
        Args:
            parent_is_subquestion:

        Returns:

        
envs/rstar/rstar_env.py