code: def _array_or_type(draw, float_or_int):
      valid_dtypes = {
          "float": draw(helpers.get_dtypes("float")),
          "int": draw(helpers.get_dtypes("integer")),
      }[float_or_int]
      return draw(
          st.sampled_from(
              (
                  draw(
                      helpers.dtype_and_values(
                          available_dtypes=valid_dtypes,
                      )
                  ),
                  draw(st.sampled_from(valid_dtypes)),
              )
          )
      )
  
imports: import numpy
  from hypothesis import strategies
  import typing
  import ivy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test, BackendHandler
label_desc: Use image node_id 1 for calling a global function with example usage: _array_or_type(draw, float_or_int) and returns: draw