Shortest path to a leaf

Write min_depth(root) that returns the number of nodes on the shortest path from the root to any leaf. An empty tree has depth 0. Note a node with one child is not a leaf.

min_depth([3, 9, 20, None, None, 15, 7])  ->  2
min_depth([2, None, 3, None, 4])          ->  3
min_depth(None)                           ->  0

The point is to practise a recursion where a missing child must not be counted as a path.

def min_depth(root):
    ...