parameters: (v, before_op)
return_statement: return mb.transpose(x=v, perm=perm, before_op=before_op)
docstring: Transpose the last 2 dims.
      v: Var (must be a tensor)
docstring_summary: Transpose the last 2 dims.
      v: Var (must be a tensor)
docstring_tokens: Transpose the last 2 dims . v : Var ( must be a tensor )
function: def transpose(v, before_op):
      """
      Transpose the last 2 dims.
      v: Var (must be a tensor)
      """
      perm = list(range(v.rank))
      perm[-2], perm[-1] = perm[-1], perm[-2]
      return mb.transpose(x=v, perm=perm, before_op=before_op)
function_tokens: def transpose ( v , before_op ) : perm = list ( range ( v . rank ) ) perm [ - 2 ] , perm [ - 1 ] = perm [ - 1 ] , perm [ - 2 ] return mb . transpose ( x = v , perm = perm , before_op = before_op )