[py] move cut_slice from cut to cmd to avoid cyclic import