copilotpiecewise function on graph - Search