code: func (s *PresenceService) UpsertNode(server services.Server) (*services.KeepAlive, error) {
  	if server.GetNamespace() == "" {
  		return nil, trace.BadParameter("missing node namespace")
  	}
  	value, err := services.GetServerMarshaler().MarshalServer(server)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	lease, err := s.Put(context.TODO(), backend.Item{
  		Key:     backend.Key(nodesPrefix, server.GetNamespace(), server.GetName()),
  		Value:   value,
  		Expires: server.Expiry(),
  		ID:      server.GetResourceID(),
  	})
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	if server.Expiry().IsZero() {
  		return &services.KeepAlive{}, nil
  	}
  	return &services.KeepAlive{LeaseID: lease.ID, ServerName: server.GetName()}, nil
  }
docs: // UpsertNode registers node presence, permanently if TTL is 0 or for the
  // specified duration with second resolution if it's >= 1 second.