def __flatten_into(root, prefix, target):
 for (name, value) in root.items():
  key = (prefix + name)
  if isinstance(value, dict):
   __flatten_into(value, (key + '.'), target)
  else:
   target[key] = value

def __flatten_into ( root , prefix , target ) : for ( name , value ) in root . items ( ) : key = ( prefix + name ) if isinstance ( value , dict ) : __flatten_into ( value , ( key + '.' ) , target ) else : target [ key ] = value
helper function that flattens a dictionary into the target dictionary .