code: def nd_indexer_strategy(draw, shape) -> NDIndexer:
      num_indices = draw(
          hps.integers(min_value=0, max_value=len(shape))
      )
      int_indexer_shape = draw(hnp.array_shapes())
      indices = tuple(
          draw(indexer_strategy(dim, int_indexer_shape))
          for dim in shape[:num_indices]
      )
      return NDIndexer.from_indices_shape(indices, shape)
  
imports: from __future__ import annotations
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax._src import util
  from jax._src.state import indexing
  import numpy
  import hypothesis.extra.numpy
  import hypothesis.strategies
label_desc: Use image node_id 5 for calling a global function with example usage: nd_indexer_strategy(draw, shape) and returns: NDIndexer