code: def _random_parafac2_data(draw):
      num_shapes = draw(st.integers(min_value=2, max_value=4))
      common_dimension = draw(st.integers(min_value=1, max_value=5))
  
      shapes = [
          (
              draw(st.integers(min_value=1, max_value=10)),
              common_dimension,
          )
          for _ in range(num_shapes)
      ]
  
      rank = draw(helpers.ints(min_value=1, max_value=10))
      dtype = draw(helpers.get_dtypes("float", full=False))
      full = draw(st.booleans())
      seed = draw(
          st.one_of(
              (st.just(None), helpers.ints(min_value=0, max_value=2000))
          )
      )
      normalise_factors = draw(st.booleans())
      return shapes, rank, dtype[0], full, seed, normalise_factors
  
imports: import pytest
  from hypothesis import strategies
  import numpy
  import ivy
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_test
label_desc: Use image node_id 2 for calling a global function with example usage: _random_parafac2_data(draw) and returns: shapes,  rank,  dtype,  full,  seed,  normalise_factors