code: def astype_helper(draw):
      dtype, x = draw(
          helpers.dtype_and_values(
              available_dtypes=helpers.get_dtypes("valid"),
              num_arrays=1,
              small_abs_safety_factor=4,
              large_abs_safety_factor=4,
              safety_factor_scale="log",
          )
      )
  
      cast_dtype = draw(
          helpers.get_castable_dtype(
              draw(helpers.get_dtypes("valid")), dtype[0], x
          )
      )
      return dtype, x, cast_dtype
  
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 4 for calling a global function with example usage: astype_helper(draw) and returns: dtype,  x,  cast_dtype