title: How to find the key of a minimum value in a nested dictionary?
body: <p>I have the following code that generates a nested dictionary.</p>
  
  <pre><code>import random
  import numpy as np
  
  dict1 = {}
  for i in range(0,2):
      dict2 = {}
      for j in range(0,3):
          dict2[j] = random.randint(1,10)
      dict1[i] = dict2
  </code></pre>
  
  <p>For example it can generate the following content of <code>dict1</code>:</p>
  
  <pre><code>{0: {0: 7, 1: 2, 2: 5}, 1: {0: 3, 1: 10, 2: 10}}
  </code></pre>
  
  <p>I want to find the sub-key of a minimum value for the fixed key. For example, for the fixed key <code>0</code>, the minimum value among the nested dictionary values is <code>2</code> which refers to thew sub-key <code>1</code>. Therefore the result should be <code>1</code>:</p>
  
  <pre><code>result=find_min(dict1[0])
  result
  1
  </code></pre>
  
  <p>How can I develop such <code>find_min</code> function?</p>