code: def _arrays_dim_idx_n_dtypes(draw):
      num_dims = draw(
          st.shared(
              helpers.ints(min_value=1, max_value=4), key="num_dims"
          )
      )
      num_arrays = 2
      common_shape = draw(
          helpers.lists(
              x=helpers.ints(min_value=2, max_value=3),
              min_size=num_dims - 1,
              max_size=num_dims - 1,
          )
      )
      _dim = draw(helpers.ints(min_value=0, max_value=num_dims - 1))
      unique_dims = draw(
          helpers.lists(
              x=helpers.ints(min_value=2, max_value=3),
              min_size=num_arrays,
              max_size=num_arrays,
          )
      )
  
      min_dim = min(unique_dims)
      max_dim = max(unique_dims)
      _idx = draw(
          helpers.array_values(
              shape=min_dim,
              dtype="int64",
              min_value=0,
              max_value=max_dim,
              exclude_min=False,
          )
      )
  
      xs = []
      available_input_types = draw(helpers.get_dtypes("numeric"))
      available_input_types.remove(
          "float16"
      )  # half summation unstable in backends
      input_dtypes = draw(
          helpers.array_dtypes(
              available_dtypes=available_input_types,
              num_arrays=num_arrays,
              shared_dtype=True,
          )
      )
      for ud, dt in zip(unique_dims, input_dtypes):
          x = draw(
              helpers.array_values(
                  shape=common_shape[:_dim]
                  + [ud]
                  + common_shape[_dim:],
                  dtype=dt,
                  large_abs_safety_factor=2.5,
                  small_abs_safety_factor=2.5,
                  safety_factor_scale="log",
              )
          )
          xs.append(x)
      return xs, input_dtypes, _dim, _idx
  
imports: import random
  from hypothesis import strategies
  import math
  import ivy
  import ivy_tests.test_ivy.helpers
  import ivy_tests.test_ivy.helpers.globals
  from ivy_tests.test_ivy.helpers import handle_frontend_test
  from ivy_tests.test_ivy.test_functional.test_core.test_manipulation import _get_splits
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.general_helpers import two_broadcastable_shapes
label_desc: Use image node_id 2 for calling a global function with example usage: _arrays_dim_idx_n_dtypes(draw) and returns: xs,  input_dtypes,  _dim,  _idx