code: def _matrix_rank_helper(draw):
      _batch_shape = draw(
          helpers.get_shape(
              min_num_dims=1, max_num_dims=3, min_dim_size=1
          )
      )
      _batch_dim = draw(st.sampled_from([(), _batch_shape]))
      _matrix_dim = draw(helpers.ints(min_value=2, max_value=20))
      shape = _batch_dim + (_matrix_dim, _matrix_dim)
      dtype, x = draw(
          helpers.dtype_and_values(
              available_dtypes=helpers.get_dtypes("float"),
              shape=shape,
              min_value=-1e05,
              max_value=1e05,
              abs_smallest_val=1e-05,
              safety_factor_scale="log",
          )
      )
      if np.all(np.swapaxes(x[0], -1, -2) == x[0]):
          hermitian = True
      else:
          hermitian = False
  
      tol_strategy = st.one_of(
          st.none(),
          st.floats(allow_nan=False, allow_infinity=False),
          helpers.array_values(
              dtype=helpers.get_dtypes("float", prune_function=False),
              shape=_batch_shape,
              min_value=-1e05,
              max_value=1e05,
              abs_smallest_val=1e-05,
              safety_factor_scale="log",
          ),
      )
      atol = draw(tol_strategy)
      rtol = draw(tol_strategy)
      return dtype, x[0], hermitian, atol, rtol
  
imports: import sys
  import numpy
  from hypothesis import assume, strategies
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.general_helpers import matrix_is_stable
label_desc: Use image node_id 8 for calling a global function with example usage: _matrix_rank_helper(draw) and returns: dtype,  x,  hermitian,  atol,  rtol