code: def _get_dtype_and_matrix_non_singular(draw, dtypes):
      while True:
          matrix = draw(
              helpers.dtype_and_values(
                  available_dtypes=dtypes,
                  min_value=-10,
                  max_value=10,
                  min_num_dims=2,
                  max_num_dims=2,
                  min_dim_size=1,
                  max_dim_size=5,
                  shape=st.tuples(
                      st.integers(1, 5), st.integers(1, 5)
                  ).filter(lambda x: x[0] == x[1]),
                  allow_inf=False,
                  allow_nan=False,
              )
          )
          if np.linalg.det(matrix[1][0]) != 0:
              break
  
      return matrix[0], matrix[1]
  
imports: import ivy
  from hypothesis import strategies, assume
  import numpy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import assert_all_close
  from ivy_tests.test_ivy.helpers import handle_frontend_test, matrix_is_stable
  from ivy_tests.test_ivy.test_functional.test_core.test_linalg import _get_dtype_and_matrix
  from ivy_tests.test_ivy.test_frontends.test_tensorflow.test_linalg import _get_second_matrix, _get_cholesky_matrix
  from ivy_tests.test_ivy.test_frontends.test_torch.test_blas_and_lapack_ops import _get_dtype_input_and_mat_vec
label_desc: Use image node_id 2 for calling a global function with example usage: _get_dtype_and_matrix_non_singular(draw, dtypes) and returns: matrix,  matrix