code: def test_tucker_to_tensor(X, ranks, true_res):
      """Test for tucker_to_tensor."""
      X = ivy.array(X)
      U = [
          ivy.arange(R * s, dtype=ivy.float32).reshape((R, s))
          for (R, s) in zip(ranks, X.shape)
      ]
      true_res = ivy.array(true_res)
      res = ivy.TuckerTensor.tucker_to_tensor((X, U))
      assert np.allclose(true_res, res)
  
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 5 for calling a global function with example usage: test_tucker_to_tensor(X, ranks, true_res) without return types