Difficulty building JuMP SparseAxisArrays for network problems

I am trying to model a network flow problem via JuMP and I am having difficulty building the flow variables with the correct indexing using @variable. For example, let’s suppose I have a network with 2 flow variables x_{12} and x_{32}. Thus, I would like to build a VariableRef container named x that can be indexed at [1, 2] and [3, 2]. In other words, I would like to do the following using @variable:

julia> @variable(model, x[some_input], container = SparseAxisArray)
JuMP.Containers.SparseAxisArray{VariableRef,2,Tuple{Int64, Int64}} with 2 entries:
  [1, 2]  =  x[1, 2]
  [3, 2]  =  x[3, 2]

Is this behavior possible to achieve with JuMP in its current state? The closest I have come using @variable is by doing the following:

julia> @variable(model, x[[(1, 2), (3, 2)]], container = SparseAxisArray)
JuMP.Containers.SparseAxisArray{VariableRef,2,Tuple{Any}} with 2 entries:
  [(1, 2)]  =  x[(1, 2)]
  [(3, 2)]  =  x[(3, 2)]

However, having the nested tuples would be nice to avoid. The only way I can figure out how to get the desired container is to define it manually by doing the following:

using JuMP

model = Model()
idxs = [(1, 2), (3, 2)]
ns = [string("x[", idxs[i][1], ", ", idxs[i][2], "]") for i = 1:2]
var_dict = Dict(idxs[i] => @variable(model, base_name = ns[i]) for i = 1:2)
x = JuMP.Containers.SparseAxisArray(var_dict)
JuMP.Containers.SparseAxisArray{VariableRef,2,Tuple{Int64,Int64}} with 2 entries:
  [1, 2]  =  x[1, 2]
  [3, 2]  =  x[3, 2]

Can this be done with @variable? Thanks!

You can go:

julia> model = Model();

julia> S = [(1, 2), (3, 2)]
2-element Array{Tuple{Int64,Int64},1}:
 (1, 2)
 (3, 2)

julia> N = 3
3

julia> @variable(model, x[i=1:N, j=1:N; (i, j) in S])
JuMP.Containers.SparseAxisArray{VariableRef,2,Tuple{Any,Any}} with 2 entries:
  [1, 2]  =  x[1,2]
  [3, 2]  =  x[3,2]

But notice that the key is Tuple{Any, Any}. In addition, if N is large, this may take a long time to build. In general, your second or third option is preferred.