code: def test_tucker_to_unfolded(shape, ranks):
      G = ivy.random_uniform(shape=shape)
      U = [
          ivy.random_uniform(shape=(ranks[i], G.shape[i]))
          for i in range(4)
      ]
      full_tensor = ivy.TuckerTensor.tucker_to_tensor((G, U))
      for mode in range(4):
          assert np.allclose(
              ivy.TuckerTensor.tucker_to_unfolded((G, U), mode),
              ivy.unfold(full_tensor, mode),
          )
          assert np.allclose(
              ivy.TuckerTensor.tucker_to_unfolded((G, U), mode),
              ivy.dot(
                  ivy.dot(U[mode], ivy.unfold(G, mode)),
                  ivy.permute_dims(
                      ivy.kronecker(U, skip_matrix=mode), (1, 0)
                  ),
              ),
          )
  
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 6 for calling a global function with example usage: test_tucker_to_unfolded(shape, ranks) without return types