code: def testDynamicShapesWithRunOptionsDisableDynamicPadder(
      self, distribution
  ):
      dataset = get_dataset_from_tensor_slices([5, 6, 7]).batch(4)
      mask_dataset = get_dataset_from_tensor_slices([1, 0, 1]).batch(4)
      dataset = dataset_ops.DatasetV2.zip((dataset, mask_dataset))
  
      input_iterator = iter(
          distribution.experimental_distribute_dataset(dataset)
      )
      options = distribute_lib.RunOptions(
          experimental_xla_options=tpu.XLAOptions(
              enable_xla_dynamic_padder=False
          )
      )
  
      @def_function.function
      def run(iterator):
          def computation(inputs):
              x, mask = inputs
              y = x * mask
              return math_ops.reduce_sum(y)
  
          inputs = next(iterator)
          outputs = distribution.experimental_local_results(
              distribution.run(
                  computation, args=(inputs,), options=options
              )
          )
          return outputs
  
      # This assumes that there are exactly 2 replicas
      self.assertAllEqual([5, 7], run(input_iterator))
  
imports: from absl.testing import parameterized
  from tensorflow.python import tf2
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import device_util
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import reduce_util
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import test_util
  from tensorflow.python.eager import def_function
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.losses import losses
  from tensorflow.python.tpu import tpu
  from tensorflow.python.util import nest
label_desc: Use image node_id 21 for calling the InputIterationTest obj's underlying member method code with example usage: obj.testDynamicShapesWithRunOptionsDisableDynamicPadder(distribution) and returns: outputs, math_ops