def _expand_probes(probes, defaults):
 expected_probes = {}
 for (probe_name, probe_test) in six.iteritems(probes):
  if (probe_name not in expected_probes.keys()):
   expected_probes[probe_name] = {}
  probe_defaults = probe_test.pop('defaults', {})
  for (test_name, test_details) in six.iteritems(probe_test):
   test_defaults = test_details.pop('defaults', {})
   expected_test_details = deepcopy(defaults)
   expected_test_details.update(probe_defaults)
   expected_test_details.update(test_defaults)
   expected_test_details.update(test_details)
   if (test_name not in expected_probes[probe_name].keys()):
    expected_probes[probe_name][test_name] = expected_test_details
 return expected_probes

def _expand_probes ( probes , defaults ) : expected_probes = { } for ( probe_name , probe_test ) in six . iteritems ( probes ) : if ( probe_name not in expected_probes . keys ( ) ) : expected_probes [ probe_name ] = { } probe_defaults = probe_test . pop ( 'defaults' , { } ) for ( test_name , test_details ) in six . iteritems ( probe_test ) : test_defaults = test_details . pop ( 'defaults' , { } ) expected_test_details = deepcopy ( defaults ) expected_test_details . update ( probe_defaults ) expected_test_details . update ( test_defaults ) expected_test_details . update ( test_details ) if ( test_name not in expected_probes [ probe_name ] . keys ( ) ) : expected_probes [ probe_name ] [ test_name ] = expected_test_details return expected_probes
updates the probes dictionary with different levels of default values .