Elaborate on some explanations. Thanks for your solution.

class Solution(object):
def permute(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
res = []
lev, avail, lev_node = 0, nums, []
N = len(nums)
def dfs(lev, avail, lev_node):
if lev == N:
res.append(lev_node)
return
for i in range(len(avail)):
dfs(lev+1, avail[:i]+avail[i+1:], lev_node+[avail[i]])
dfs(lev, avail, lev_node)
return(res)
lev: level of tree, i.e. the length of node
avail: elements available to be combined to form new child node
lev_node: node content
dfs(lev, avail, lev_node)
dfs(0, [1,2,3], [])
|- dfs(1, [2,3], [1])
|- dfs(2, [3], [1,2])
|- ...
|- dfs(2, [2], [1,3])
|- dfs(3, [], [1,3,2])
|- no more
|- dfs(1, [1,3], [2])
|- ...
|- dfs(2, [1,2], [3])
|- ...