code: def _get_dtype_and_3dbatch_matrices(
      draw, with_input=False, input_3d=False
  ):
      dim_size1 = draw(helpers.ints(min_value=2, max_value=5))
      dim_size2 = draw(helpers.ints(min_value=2, max_value=5))
      shared_size = draw(helpers.ints(min_value=2, max_value=5))
      dtype = draw(helpers.get_dtypes("float", full=True))
      dtype = [
          draw(
              st.sampled_from(
                  tuple(set(dtype).difference({"bfloat16", "float16"}))
              )
          )
      ]
      batch_size = draw(helpers.ints(min_value=2, max_value=4))
      mat1 = draw(
          helpers.array_values(
              dtype=dtype[0],
              shape=(batch_size, dim_size1, shared_size),
              min_value=2,
              max_value=5,
          )
      )
      mat2 = draw(
          helpers.array_values(
              dtype=dtype[0],
              shape=(batch_size, shared_size, dim_size2),
              min_value=2,
              max_value=5,
          )
      )
      if with_input:
          if input_3d:
              input = draw(
                  helpers.array_values(
                      dtype=dtype[0],
                      shape=(batch_size, dim_size1, dim_size2),
                      min_value=2,
                      max_value=5,
                  )
              )
              return dtype, input, mat1, mat2
          input = draw(
              helpers.array_values(
                  dtype=dtype[0],
                  shape=(dim_size1, dim_size2),
                  min_value=2,
                  max_value=5,
              )
          )
          return dtype, input, mat1, mat2
      return dtype, mat1, mat2
  
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 2 for calling a global function with example usage: _get_dtype_and_3dbatch_matrices(draw, with_input, input_3d) and returns: dtype,  mat1,  mat2, dtype,  input,  mat1,  mat2, dtype,  input,  mat1,  mat2