How to create a tuples with Sourceror library (AST pattern)

I am using Sourceror library to create a new mix.exs file for my project, but I have problem to create a tuple I want. It is very hard to create a pattern.

defp dep(name, version, dep_line, other_options) do
    {:__block__, [line: dep_line],
      [
        {
          name,
          {:__block__, [line: dep_line, delimiter: "\""], ["~> " <> version}
        }
      ]
    }
  end

Imaging you have this function to create something like this, based on: sourceror/add_dependency.exs at main · doorgan/sourceror · GitHub

{:phoenix_html, "~> 3.0"}

So if I have something like this? What shall I do?

{:phoenix_html, "~> 1.2", only: :dev, test: :runtime}

This is the file I am working on it: mishka_installer/mix_creator.ex at master · mishka-group/mishka_installer · GitHub

Thank you

I did like this:

defp implement_other_options(other_options, dep_line, :nested) do
    Enum.map(other_options, fn {key, value} ->
      {{:__block__, [trailing_comments: [], leading_comments: [], format: :keyword, line: dep_line], [key]},
      {:__block__, [trailing_comments: [], leading_comments: [], line: dep_line], [value]}}
    end)
end