code: func (sn *SimNode) Snapshots() (map[string][]byte, error) {
  	sn.lock.RLock()
  	services := make(map[string]node.Service, len(sn.running))
  	for name, service := range sn.running {
  		services[name] = service
  	}
  	sn.lock.RUnlock()
  	if len(services) == 0 {
  		return nil, errors.New("no running services")
  	}
  	snapshots := make(map[string][]byte)
  	for name, service := range services {
  		if s, ok := service.(interface {
  			Snapshot() ([]byte, error)
  		}); ok {
  			snap, err := s.Snapshot()
  			if err != nil {
  				return nil, err
  			}
  			snapshots[name] = snap
  		}
  	}
  	return snapshots, nil
  }
docs: // Snapshots creates snapshots of the services by calling the
  // simulation_snapshot RPC method