def key_value_to_tree(data):
 tree = {}
 for (flatkey, value) in six.iteritems(data):
  t = tree
  keys = flatkey.split(__opts__['pepa_delimiter'])
  for key in keys:
   if (key == keys[(-1)]):
    t[key] = value
   else:
    t = t.setdefault(key, {})
 return tree

def key_value_to_tree ( data ) : tree = { } for ( flatkey , value ) in six . iteritems ( data ) : t = tree keys = flatkey . split ( __opts__ [ 'pepa_delimiter' ] ) for key in keys : if ( key == keys [ ( - 1 ) ] ) : t [ key ] = value else : t = t . setdefault ( key , { } ) return tree
convert key/value to tree .