code: def _helper_r_(draw):
      elems_in_last_dim = draw(st.integers(min_value=2, max_value=8))
      num_of_elems = draw(st.integers(min_value=1, max_value=4))
      dim = draw(st.one_of(st.just(1), st.integers(2, 4)))
      first_elem_str = draw(st.booleans())
      ret = []
      if first_elem_str:
          to_mat = draw(st.booleans())
          if to_mat:
              elem = draw(st.sampled_from(["c", "r"]))
              dim = min(dim, 2)
          else:
              num = draw(st.integers(1, 3))
              elem = ""
              if num == 1:
                  elem += str(draw(st.integers(-1, dim - 1)))
              elif num >= 2:
                  ndmin = draw(st.integers(1, 6))
                  elem += str(draw(st.integers(-1, ndmin - 1)))
                  elem += "," + str(ndmin)
  
              if num == 3:
                  elem += "," + str(draw(st.integers(-1, ndmin - 1)))
          ret.append(elem)
      if "ndmin" not in locals():
          ndmin = False
  
      if dim == 1:
          while num_of_elems > 0:
              num_of_elems -= 1
              elem_type = draw(st.sampled_from(["array", "slice"]))
  
              if elem_type == "array":
                  if not ndmin:
                      shape = (draw(st.integers(1, 5)),)
                  else:
                      shape = (elems_in_last_dim,)
                  elem = draw(
                      helpers.array_values(
                          dtype=helpers.get_dtypes("valid"),
                          shape=shape,
                      )
                  )
                  if len(elem) == 1 and draw(st.booleans()):
                      elem = elem[0]
              else:
                  start = draw(
                      st.integers(min_value=-100, max_value=100)
                  )
                  step = draw(st.integers(1, 3))
                  if not ndmin:
                      stop = draw(st.integers(start + 1, start + 10))
                  else:
                      stop = start + 1 + (elems_in_last_dim - 1) * step
  
                  elem = slice(start, stop, step)
              ret.append(elem)
      else:
          elem_shape = draw(
              helpers.get_shape(min_num_dims=dim, max_num_dims=dim)
          )
          input_dtypes, x, casting, dtype = draw(
              np_frontend_helpers.dtypes_values_casting_dtype(
                  arr_func=[
                      lambda: helpers.dtype_and_values(
                          available_dtypes=helpers.get_dtypes(
                              "numeric"
                          ),
                          shape=elem_shape,
                          num_arrays=num_of_elems,
                          shared_dtype=True,
                      )
                  ],
              ),
          )
          ret += x
      return ret, elems_in_last_dim, dim
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_numpy/test_indexing_routines/test_inserting_data_into_arrays.py
imports: from hypothesis import strategies
  import numpy
  import ivy_tests.test_ivy.helpers
  import ivy_tests.test_ivy.test_frontends.test_numpy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test, BackendHandler
  import ivy.functional.frontends.numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _helper_r_(draw) and returns: ret,  elems_in_last_dim,  dim