title: PyMongo : Time delay of 2 seconds recursive
body: <p>I want to create a function in python in which, Before the record will be read from MongoDB a time of 2 seconds should be waited to and after that it executes find query, If then the record doesn’t exists yet an additional read retry after 2 more seconds should be done.
  If the record does not exist either then return none.</p>
  <p>Created a function like this :</p>
  <pre><code>def get_document(self, count):
      count += 1
      time.sleep(2)
      document = list(self.collection.find({&quot;id&quot;: 1}))
      if document:
          return document[0]
      else:
          return None if count == 2 else self.get_document(count)
  </code></pre>
  <p>I think there should be a better way to do this, so What is the best pythonic way to do the above?</p>