How do I add columns to an algorithm using the "algo" package?


I’m using the “algo” package and I’d like to know if there’s a way to modify it to achieve something like the image. If not, I’d like to know if there’s another way. Thank you very much!

Here is the code for the algorithm I made with the “algo” package.

#import "@preview/algo:0.3.6": algo, i, d, comment, code
#set text(font: "New Computer Modern", size: 11pt)

= Test
#algo(
  title: "INSERTION-SORT",
  parameters: ("A","n"),
  block-align: left
)[
  for $i = 2$ to $n$: #i \ 
  key = $A[i]$ \ 
  #comment(inline: true)[Insert A[i] into the sorted subarray A[1:i-1]] \
  $j = i - 1$ \
  while $j > 0$ and $A[j] >$ key: #i \
    $A[j + 1] = A[j]$ \
    $j = j - 1$ #d \
    $A[j + 1] =$ key
]