code: def test_positional_sharding_with_iterator_decorator():
      # given
      mesh = mesh_utils.create_device_mesh((jax.device_count(), 1))
      sharding = PositionalSharding(mesh)
  
      output_map = ["tensor"]
  
      # when
      @data_iterator(
          output_map=output_map,
          sharding=sharding,
          last_batch_policy=LastBatchPolicy.DROP,
          reader_name="reader",
      )
      def iterator_function(shard_id, num_shards):
          return iterator_function_def(
              shard_id=shard_id, num_shards=num_shards
          )
  
      data_iterator_instance = iterator_function(
          batch_size=batch_size, num_threads=4
      )
  
      # then
      run_sharded_iterator_test(data_iterator_instance)
  
imports: import jax
  import numpy
  import nvidia.dali.plugin.jax
  from nvidia.dali import pipeline_def
  import nvidia.dali.fn
  import nvidia.dali.types
  from nvidia.dali.plugin.jax import DALIGenericIterator, data_iterator
  from nvidia.dali.plugin.base_iterator import LastBatchPolicy
  from jax.sharding import PositionalSharding, NamedSharding, PartitionSpec, Mesh
  from jax.experimental import mesh_utils
  from utils import get_dali_tensor_gpu, iterator_function_def
  import jax.numpy
  import itertools
  from nose_utils import raises
label_desc: Use image node_id 12 for calling a global function with example usage: test_positional_sharding_with_iterator_decorator() and returns: iterator_function_def