code: def test_partial_tucker(
      *, data, test_flags, backend_fw, fn_name, on_device
  ):
      (
          input_dtypes,
          x,
          rank,
          modes,
          n_iter_max,
          mask,
          svd_mask_repeats,
          tol,
      ) = data
      results = helpers.test_function(
          backend_to_test=backend_fw,
          test_flags=test_flags,
          fn_name=fn_name,
          on_device=on_device,
          input_dtypes=input_dtypes,
          x=x,
          rank=rank,
          modes=modes,
          n_iter_max=n_iter_max,
          tol=tol,
          mask=mask,
          svd_mask_repeats=svd_mask_repeats,
          test_values=False,
      )
  
      ret_np, ret_from_gt_np = results
  
      core = helpers.flatten_and_to_np(
          ret=ret_np[0], backend=backend_fw
      )
      factors = helpers.flatten_and_to_np(
          ret=ret_np[1], backend=backend_fw
      )
      core_gt = helpers.flatten_and_to_np(
          ret=ret_from_gt_np[0], backend=test_flags.ground_truth_backend
      )
      factors_gt = helpers.flatten_and_to_np(
          ret=ret_from_gt_np[1], backend=test_flags.ground_truth_backend
      )
  
      with BackendHandler.update_backend(backend_fw) as ivy_backend:
          n_elem = int(ivy_backend.prod(rank[: len(modes)])) * int(
              ivy_backend.prod(x.shape[len(modes) :])
          )
      for c, c_gt in zip(core, core_gt):
          assert np.prod(c.shape) == n_elem
          assert np.prod(c_gt.shape) == n_elem
  
      for f, f_gt in zip(factors, factors_gt):
          assert np.prod(f.shape) == np.prod(f_gt.shape)
  
imports: import math
  from hypothesis import strategies
  from hypothesis import assume
  import numpy
  import pytest
  import itertools
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
  import ivy
label_desc: Use image node_id 47 for calling a global function with example usage: test_partial_tucker() without return types