def _to_flat_dict_key(keys):
  """Converts a list of nested keys to flat keys used in state.as_dict().

  Args:
    keys: List of keys from outmost to innermost.
  Returns:
    Corresponding flat dictionary for the given list of keys.
  """
  return '/' + '/'.join(keys)