code: def test_cp_to_vec(shapeU1, shapeU2, shapeU3, shapeU4):
      """Test for cp_to_vec."""
      U1 = np.reshape(np.arange(1, 10, dtype=float), shapeU1)
      U2 = np.reshape(np.arange(10, 22, dtype=float), shapeU2)
      U3 = np.reshape(np.arange(22, 28, dtype=float), shapeU3)
      U4 = np.reshape(np.arange(28, 34, dtype=float), shapeU4)
      U = [ivy.array(t) for t in [U1, U2, U3, U4]]
      cp_tensor = ivy.CPTensor(
          (
              ivy.ones(
                  (3),
              ),
              U,
          )
      )
      full_tensor = ivy.CPTensor.cp_to_tensor(cp_tensor)
      true_res = ivy.reshape(full_tensor, (-1))
      res = ivy.CPTensor.cp_to_vec(cp_tensor)
      assert np.allclose(true_res, res)
  
file_path: ivy/ivy_tests/test_ivy/test_misc/test_factorized_tensor/test_cp_tensor.py
imports: import ivy
  import numpy
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_cp_to_vec(shapeU1, shapeU2, shapeU3, shapeU4) without return types