import tensorflow as tf

      # There should have been a timeout here because only one sample was added
      # and the minimum batch size is 2.
      self.assertLessEqual(.9, duration.total_seconds())
      self.assertGreaterEqual(1.5, duration.total_seconds())

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

      start = datetime.datetime.now()
      (_, batch_size), _ = session.run(outputs)
      duration = datetime.datetime.now() - start

