code: func detectCRISocketImpl(isSocket func(string) bool) (string, error) {
  	const (
  		dockerSocket     = "/var/run/docker.sock" // The Docker socket is not CRI compatible
  		containerdSocket = "/run/containerd/containerd.sock"
  	)
  
  	foundCRISockets := []string{}
  	knownCRISockets := []string{
  		// Docker and containerd sockets are special cased below, hence not to be included here
  		"/var/run/crio/crio.sock",
  	}
  
  	if isSocket(dockerSocket) {
  		// the path in dockerSocket is not CRI compatible, hence we should replace it with a CRI compatible socket
  		foundCRISockets = append(foundCRISockets, constants.DefaultDockerCRISocket)
  	} else if isSocket(containerdSocket) {
  		// Docker 18.09 gets bundled together with containerd, thus having both dockerSocket and containerdSocket present.
  		// For compatibility reasons, we use the containerd socket only if Docker is not detected.
  		foundCRISockets = append(foundCRISockets, containerdSocket)
  	}
  
  	for _, socket := range knownCRISockets {
  		if isSocket(socket) {
  			foundCRISockets = append(foundCRISockets, socket)
  		}
  	}
  
  	switch len(foundCRISockets) {
  	case 0:
  		// Fall back to Docker if no CRI is detected, we can error out later on if we need it
  		return constants.DefaultDockerCRISocket, nil
  	case 1:
  		// Precisely one CRI found, use that
  		return foundCRISockets[0], nil
  	default:
  		// Multiple CRIs installed?
  		return "", errors.Errorf("Found multiple CRI sockets, please use --cri-socket to select one: %s", strings.Join(foundCRISockets, ", "))
  	}
  }
docs: // detectCRISocketImpl is separated out only for test purposes, DON'T call it directly, use DetectCRISocket instead