def flatten_nested_dict(x,
                        join_str = '/',
                        prefix = ''):
  """Transforms nested dictionary into a flat dictionary."""
  assert isinstance(x, dict)
  result = {}
  for k, v in x.items():
    key = prefix + join_str + k
    if isinstance(v, dict):
      result.update(flatten_nested_dict(v, join_str, key))
    else:
      result[key] = v
  return result