code: def dtypes_shared(draw, num_dtypes):
      if isinstance(num_dtypes, str):
          num_dtypes = draw(st.shared(helpers.ints(), key=num_dtypes))
      return draw(
          st.shared(
              st.lists(
                  st.sampled_from(draw(helpers.get_dtypes("valid"))),
                  min_size=num_dtypes,
                  max_size=num_dtypes,
              ),
              key="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 7 for calling a global function with example usage: dtypes_shared(draw, num_dtypes) and returns: draw