code: def test_torch_randperm(
      *,
      n,
      dtype,
      on_device,
      fn_tree,
      frontend,
      test_flags,
      backend_fw,
  ):
      def call():
          return helpers.test_frontend_function(
              input_dtypes=dtype,
              backend_to_test=backend_fw,
              frontend=frontend,
              test_flags=test_flags,
              fn_tree=fn_tree,
              on_device=on_device,
              test_values=False,
              n=n,
          )
  
      ret = call()
  
      if not ivy.exists(ret):
          return
  
      ret_np, ret_from_np = ret
      ret_np = helpers.flatten_and_to_np(ret=ret_np, backend=backend_fw)
      ret_from_np = helpers.flatten_and_to_np(
          ret=ret_from_np, backend=backend_fw
      )
      for u, v in zip(ret_np, ret_from_np):
          assert u.dtype == v.dtype
          assert u.shape == v.shape
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_torch/test_random_sampling.py
imports: from hypothesis import strategies
  import importlib
  import ivy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
label_desc: Use image node_id 13 for calling a global function with example usage: test_torch_randperm() and returns: helpers