code: def test_tucker_to_vec(shape, ranks):
      G = ivy.random_uniform(shape=shape)
      ranks = [2, 2, 3, 4]
      U = [
          ivy.random_uniform(shape=(ranks[i], G.shape[i]))
          for i in range(4)
      ]
      vec = ivy.reshape(ivy.TuckerTensor.tucker_to_tensor((G, U)), -1)
      assert np.allclose(ivy.TuckerTensor.tucker_to_vec((G, U)), vec)
      assert np.allclose(
          ivy.TuckerTensor.tucker_to_vec((G, U)),
          ivy.dot(ivy.kronecker(U), ivy.reshape(G, -1)),
      )
  
file_path: ivy/ivy_tests/test_ivy/test_misc/test_factorized_tensor/test_tucker_tensor.py
imports: import ivy
  import numpy
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_tucker_to_vec(shape, ranks) without return types