import tensorflow as tf

  def test_minimum_batch_size(self):
    with self.test_session() as session:
      @dynamic_batching.batch_fn_with_options(
          minimum_batch_size=2, timeout_ms=1000)
      def f(a, b):
        batch_size = tf.shape(a)[0]
        return a + b, tf.tile([batch_size], [batch_size])

      output = f(tf.constant([[1, 3]]), tf.constant([2]))

      tf.train.start_queue_runners()

