def pop_example(address, timeout_in_ms=10 * 1000 * 60):
  """Pop an example from the given rpc server.

  This op intentionally fails when the server is unavailable. This is because
  the RPC op silently fails to recover when the server recovers.

  Args:
    address (string): Server created by `push_examples`.
    timeout_in_ms (in): How long we are willing to wait for the next example.

  Returns:
    response (Tensor<string> []): Serialized tf.Example.
  """
  result = _make_rpc_op(address, timeout_in_ms)
  assert_ok = tf.assert_equal(
      x=result.status_code,
      y=tf.errors.OK,
      data=["RPC call failed", result.status_message])
  with tf.control_dependencies([assert_ok]):
    return tf.identity(result.response)
Pop an example from the given rpc server.

  This op intentionally fails when the server is unavailable. This is because
  the RPC op silently fails to recover when the server recovers.

  Args:
    address (string): Server created by `push_examples`.
    timeout_in_ms (in): How long we are willing to wait for the next example.

  Returns:
    response (Tensor<string> []): Serialized tf.Example.
  
language/realm/preprocessing.py