def METHOD_NAME(request, id, path):
  cluster = get_cluster_or_404(id)
  zk = ZooKeeper(cluster['rest_url'])
  node = zk.get(path)
  if request.method == 'POST':
    if not is_admin(request.user):
      raise PopupException(_('You are not a superuser'))
    form = EditZNodeForm(request.POST)
    if form.is_valid():
      # TODO is valid base64 string?
      data = form.cleaned_data['data'].decode('base64')
      zk.set(path, data, form.cleaned_data['version'])
    return tree(request, id, path)
  else:
    form = EditZNodeForm(dict(\
      data=node.get('data64', ''),
      version=node.get('version', '-1')))
  return render('edit.mako', request, {'cluster': cluster, 'path': path, 'form': form, 'clusters': CLUSTERS.get(),})