def METHOD_NAME(structure, separator='/'):
  """Replacement for deprecated tf.nest.flatten_with_joined_string_paths."""
  return [(separator.join(map(str, path)), item)
          for path, item in tree.flatten_with_path(structure)]