code: def _get_repeat_interleaves_args(
      draw, *, available_dtypes, valid_axis, max_num_dims, max_dim_size
  ):
      values_dtype, values, axis, shape = draw(
          helpers.dtype_values_axis(
              available_dtypes=available_dtypes,
              valid_axis=valid_axis,
              force_int_axis=True,
              shape=draw(
                  helpers.get_shape(
                      allow_none=False,
                      min_num_dims=0,
                      max_num_dims=max_num_dims,
                      min_dim_size=1,
                      max_dim_size=max_dim_size,
                  )
              ),
              ret_shape=True,
          )
      )
  
      if axis is None:
          generate_repeats_as_integer = draw(st.booleans())
          num_repeats = (
              1
              if generate_repeats_as_integer
              else math.prod(tuple(shape))
          )
      else:
          num_repeats = shape[axis]
  
      repeats_dtype, repeats = draw(
          helpers.dtype_and_values(
              available_dtypes=helpers.get_dtypes("integer"),
              min_value=0,
              max_value=10,
              shape=[num_repeats],
          )
      )
  
      # Output size is an optional parameter accepted by Torch for optimisation
      use_output_size = draw(st.booleans())
      output_size = np.sum(repeats) if use_output_size else None
  
      return (
          [values_dtype, repeats_dtype],
          values,
          repeats,
          axis,
          output_size,
      )
  
imports: import math
  import numpy
  from hypothesis import assume, strategies
  import hypothesis.extra.numpy
  import ivy
  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 _get_dtype_value1_value2_axis_for_tensordot
label_desc: Use image node_id 3 for calling a global function with example usage: _get_repeat_interleaves_args(draw) and returns: list,  values,  repeats,  axis,  output_size