code: def dtype_values_axis(
      draw,
      *,
      available_dtypes,
      num_arrays=1,
      abs_smallest_val=None,
      min_value=None,
      max_value=None,
      large_abs_safety_factor=1.1,
      small_abs_safety_factor=1.1,
      safety_factor_scale="linear",
      allow_inf=False,
      allow_nan=False,
      exclude_min=False,
      exclude_max=False,
      min_num_dims=0,
      max_num_dims=5,
      min_dim_size=1,
      max_dim_size=10,
      shape=None,
      shared_dtype=False,
      min_axis=None,
      max_axis=None,
      valid_axis=False,
      allow_neg_axes=True,
      min_axes_size=1,
      max_axes_size=None,
      force_int_axis=False,
      force_tuple_axis=False,
      ret_shape=False,
  ):
      """Draws a list of arrays with elements from the given data type, and a
      random axis of the arrays.
  
      Parameters
      ----------
      draw
          special function that draws data randomly (but is reproducible) from a given
          data-set (ex. list).
      available_dtypes
          if dtype is None, data type is drawn from this list randomly.
      num_arrays
          Number of arrays to be drawn.
      abs_smallest_val
          sets the absolute smallest value to be generated for float data types,
          this has no effect on integer data types. If none, the default data type
          absolute smallest value is used.
      min_value
          minimum value of elements in the array.
      max_value
          maximum value of elements in the array.
      large_abs_safety_factor
          A safety factor of 1 means that all values are included without limitation,
  
          when a "linear" safety factor scaler is used, a safety factor of 2 means
          that only 50% of the range is included, a safety factor of 3 means that
          only 33% of the range is included etc.
  
          when a "log" safety factor scaler is used, a data type with maximum
          value of 2^32 and a safety factor of 2 transforms the maximum to 2^16.
      small_abs_safety_factor
          A safety factor of 1 means that all values are included without limitation,
          this has no effect on integer data types.
  
          when a "linear" safety factor scaler is used, a data type with minimum
          representable number of 0.0001 and a safety factor of 2 transforms the
          minimum to 0.0002, a safety factor of 3 transforms the minimum to 0.0003 etc.
  
          when a "log" safety factor scaler is used, a data type with minimum
          representable number of 0.5 * 2^-16 and a safety factor of 2 transforms the
          minimum to 0.5 * 2^-8, a safety factor of 3 transforms the minimum to 0.5 * 2^-4
      safety_factor_scale
          The operation to use when calculating the maximum value of the list. Can be
          "linear" or "log". Default value = "linear".
      allow_inf
          if True, allow inf in the array.
      allow_nan
          if True, allow Nans in the arrays.
      exclude_min
          if True, exclude the minimum limit.
      exclude_max
          if True, exclude the maximum limit.
      min_num_dims
          minimum size of the shape tuple.
      max_num_dims
          maximum size of the shape tuple.
      min_dim_size
          minimum value of each integer in the shape tuple.
      max_dim_size
          maximum value of each integer in the shape tuple.
      valid_axis
          if True, a valid axis will be drawn from the array dimensions.
      allow_neg_axes
          if True, returned axes may include negative axes.
      min_axes_size
          minimum size of the axis tuple.
      max_axes_size
          maximum size of the axis tuple.
      force_tuple_axis
          if true, all axis will be returned as a tuple.
      force_int_axis
          if true, the returned axis will be an int.
      shape
          shape of the array. if None, a random shape is drawn.
      shared_dtype
          if True, if dtype is None, a single shared dtype is drawn for all arrays.
      min_axis
          if shape is None, axis is drawn from the range [min_axis, max_axis].
      max_axis
          if shape is None, axis is drawn from the range [min_axis, max_axis].
      ret_shape
          if True, the shape of the arrays is also returned.
  
      Returns
      -------
      ret
          A strategy that draws a tuple of a list of dtypes,
          a list of arrays, and an axis.
  
      Examples
      --------
      >>> dtype_values_axis()
      (['int16'], [array(29788, dtype=int16)], 0)
  
      >>> dtype_values_axis()
      (['complex128'], [array(1.62222885e+156-2.68281172e-257j)], -1)
  
      >>> dtype_values_axis()
      (['float64'], [array(-1.40129846e-45)], 3)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=2,
      ... )
      (['int8', 'int16'], [array([[0]], dtype=int8), array([[1]], dtype=int16)], 0)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=2,
      ... )
      (['uint16', 'uint16'], [array(0, dtype=uint16), array(0, dtype=uint16)], 0)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=2,
      ... )
      (['float64', 'int16'], [array(-2.44758124e-308), array(0, dtype=int16)], 0)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("float"),
      ...     min_num_dims=2,
      ...     max_num_dims=3,
      ...     min_dim_size=2,
      ...     max_dim_size=5,
      ...     min_axis=-2,
      ...     max_axis=1,
      ... )
      (['float64'], [array([[1.90000000e+000, 1.63426649e+308],
          [-1.50000000e+000, -1.91931887e+234]])], -1)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("float"),
      ...     min_num_dims=2,
      ...     max_num_dims=3,
      ...     min_dim_size=2,
      ...     max_dim_size=5,
      ...     min_axis=-2,
      ...     max_axis=1,
      ... )
      (['bfloat16'], [array([[-1.29488e-38, -1.29488e-38],
          [-1.29488e-38, -1.29488e-38]], dtype=bfloat16)], 0)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("float"),
      ...     min_num_dims=2,
      ...     max_num_dims=3,
      ...     min_dim_size=2,
      ...     max_dim_size=5,
      ...     min_axis=-2,
      ...     max_axis=1,
      ... )
      (['float64'], [array([[-2.44758124e-308, -2.44758124e-308],
          [-2.44758124e-308, -2.44758124e-308]])], 0)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=1,
      ...     allow_inf=True,
      ...     allow_nan=True,
      ... )
      (['float64'], [array([inf, -5.14361019e+16, 5.96046448e-08, 1.50000000e+00])], -51)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=1,
      ...     allow_inf=True,
      ...     allow_nan=True,
      ... )
      (['int16'], [array(12445, dtype=int16)], 171)
  
      >>> dtype_values_axis(
      ...     available_dtypes=get_dtypes("numeric"),
      ...     num_arrays=1,
      ...     allow_inf=True,
      ...     allow_nan=True,
      ... )
      (['uint32'], [array([0], dtype=uint32)], 0)
      """
      results = draw(
          dtype_and_values(
              available_dtypes=available_dtypes,
              num_arrays=num_arrays,
              abs_smallest_val=abs_smallest_val,
              min_value=min_value,
              max_value=max_value,
              large_abs_safety_factor=large_abs_safety_factor,
              small_abs_safety_factor=small_abs_safety_factor,
              safety_factor_scale=safety_factor_scale,
              allow_inf=allow_inf,
              allow_nan=allow_nan,
              exclude_min=exclude_min,
              exclude_max=exclude_max,
              min_num_dims=min_num_dims,
              max_num_dims=max_num_dims,
              min_dim_size=min_dim_size,
              max_dim_size=max_dim_size,
              shape=shape,
              shared_dtype=shared_dtype,
              ret_shape=True,
          )
      )
      dtype, values, arr_shape = results
      if valid_axis or shape:
          if values[0].ndim == 0:
              axis = None
          else:
              axis = draw(
                  gh.get_axis(
                      shape=arr_shape,
                      min_size=min_axes_size,
                      max_size=max_axes_size,
                      allow_neg=allow_neg_axes,
                      force_int=force_int_axis,
                      force_tuple=force_tuple_axis,
                  )
              )
      else:
          axis = draw(
              number_helpers.ints(
                  min_value=min_axis, max_value=max_axis
              )
          )
      if ret_shape:
          return dtype, values, axis, arr_shape
      return dtype, values, axis
  
imports: import numpy
  import hypothesis.extra.numpy
  from hypothesis import strategies
  from hypothesis.internal.floats import float_of
  from functools import reduce
  from operator import mul
  import sys
  import string
  import ml_dtypes
  import ivy_tests.test_ivy.helpers.globals
  from ..pipeline_helper import WithBackendContext
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers.hypothesis_helpers.dtype_helpers import get_dtypes
  from .None import general_helpers
  from .None import dtype_helpers, number_helpers
  from ..globals import mod_backend
label_desc: Use image node_id 5 for calling a global function with example usage: dtype_values_axis(draw) and returns: dtype,  values,  axis, dtype,  values,  axis,  arr_shape