code: def test_parafac2_to_tensor(weights, factors, projections, true_res):
      weights = ivy.array(weights)
      factors = [ivy.array(f) for f in factors]
      projections = [ivy.array(p) for p in projections]
      true_res = ivy.array(true_res)
      res = ivy.Parafac2Tensor.parafac2_to_tensor(
          (weights, factors, projections)
      )
      assert np.allclose(res, true_res)
  
file_path: ivy/ivy_tests/test_ivy/test_misc/test_factorized_tensor/test_parafac2_tensor.py
imports: import ivy
  import numpy
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_parafac2_to_tensor(weights, factors, projections, true_res) without return types