code: def test_tensor_to_vec():
      """Test for tensor_to_vec"""
      X = T.tensor(
          [
              [[0, 1], [2, 3], [4, 5], [6, 7]],
              [[8, 9], [10, 11], [12, 13], [14, 15]],
              [[16, 17], [18, 19], [20, 21], [22, 23]],
          ]
      )
      true_res = T.tensor(
          [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
          ]
      )
      assert_array_equal(tensor_to_vec(X), true_res)
  
file_path: tensorly/tensorly/tests/test_core.py
imports: import numpy
  from ..None import backend
  from ..base import fold, unfold
  from ..base import partial_fold, partial_unfold
  from ..base import tensor_to_vec, vec_to_tensor
  from ..base import partial_tensor_to_vec, partial_vec_to_tensor
  from ..base import matricize
  from ..testing import assert_array_equal, assert_raises
label_desc: Use image node_id 3 for calling a global function with example usage: test_tensor_to_vec() without return types