def link_step(
        self,
        next_step: "TaskStep",
    ) -> None:
        """
        Link to next step.

        Add link from this step to next, and from next step to current.

        """
        self.next_steps[next_step.step_id] = next_step
        next_step.prev_steps[self.step_id] = self

        Link to next step.

        Add link from this step to next, and from next step to current.

        
llama-index-core/llama_index/core/base/agent/types.py