code: def test_torch_matrix_rank(
      dtype_x_hermitian_atol_rtol,
      on_device,
      fn_tree,
      frontend,
      test_flags,
      backend_fw,
  ):
      dtype, x, hermitian, atol, rtol = dtype_x_hermitian_atol_rtol
      assume(matrix_is_stable(x, cond_limit=10))
      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,
          A=x,
          atol=atol,
          rtol=rtol,
          hermitian=hermitian,
      )
  
imports: import sys
  import numpy
  from hypothesis import strategies, assume
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
  from ivy_tests.test_ivy.test_functional.test_core.test_linalg import _matrix_rank_helper
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.general_helpers import matrix_is_stable
label_desc: Use image node_id 21 for calling a global function with example usage: test_torch_matrix_rank(dtype_x_hermitian_atol_rtol, on_device, fn_tree, frontend, test_flags, backend_fw) without return types