Update testable docstring.

Sort the dict to make sure the ordering of the output.

PiperOrigin-RevId: 334239977
Change-Id: I05b3fd814950c85a38395e9cfb2b49cb5ae1af2f
diff --git a/tensorflow/python/keras/layers/preprocessing/preprocessing_stage.py b/tensorflow/python/keras/layers/preprocessing/preprocessing_stage.py
index 5d4b5d2..6bcae29 100644
--- a/tensorflow/python/keras/layers/preprocessing/preprocessing_stage.py
+++ b/tensorflow/python/keras/layers/preprocessing/preprocessing_stage.py
@@ -161,9 +161,9 @@
     >>> stage = FunctionalPreprocessingStage(inputs, outputs)
     >>> ds = tf.data.Dataset.from_tensor_slices({'x1': tf.ones((4,5)),
     ...                                          'x2': tf.ones((4,1))})
-    >>> ds.element_spec # Check element_spec
-    {'x1': TensorSpec(shape=(5,), dtype=tf.float32, name=None),
-     'x2': TensorSpec(shape=(1,), dtype=tf.float32, name=None)}
+    >>> sorted(ds.element_spec.items()) # Check element_spec
+    [('x1', TensorSpec(shape=(5,), dtype=tf.float32, name=None)),
+     ('x2', TensorSpec(shape=(1,), dtype=tf.float32, name=None))]
     >>> stage.adapt(ds)
     >>> data_np = {'x1': np.ones((4, 5)), 'x2': np.ones((4, 1))}
     >>> stage.adapt(data_np)