code: def test_tucker_normalize():
      shape = (3, 4, 5)
      rank = (3, 2, 4)
      tucker_ten = random_tucker(shape, rank)
      core, factors = tucker_normalize(tucker_ten)
      for i in range(len(factors)):
          assert_array_almost_equal(
              tl.norm(factors[i], axis=0), tl.ones(rank[i])
          )
      assert_array_almost_equal(
          tucker_to_tensor((core, factors)),
          tucker_to_tensor(tucker_ten),
      )
  
file_path: tensorly/tensorly/tests/test_tucker_tensor.py
imports: import numpy
  from ..None import backend
  from ..base import unfold, tensor_to_vec
  from ..tucker_tensor import tucker_to_tensor, tucker_to_unfolded, tucker_to_vec, _validate_tucker_tensor, tucker_mode_dot, tucker_normalize, _tucker_n_param, validate_tucker_rank
  from ..tenalg import kronecker, mode_dot
  from ..testing import assert_array_equal, assert_array_almost_equal, assert_equal, assert_raises, assert_
  from ..random import random_tucker
label_desc: Use image node_id 8 for calling a global function with example usage: test_tucker_normalize() without return types