title: What is a "stateful object" in tensorflow?
body: <p>In several parts of the documentation (e.g. <code>Dataset Iterators</code> <a href="https://www.tensorflow.org/guide/datasets#consuming_values_from_an_iterator" rel="noreferrer">here</a>) there are references to <code>Stateful Objects</code>. What exactly are they and what role do they play in the graph?</p>
  
  <p>To clarify, in the Dataset documentation there's an example with the <code>one_shot_iterator</code> that works because it's stateless:  </p>
  
  <pre><code>dataset = tf.data.Dataset.range(100)
  iterator = dataset.make_one_shot_iterator()
  </code></pre>
  
  <p>what makes the iterator stateless?</p>