code: def durability(self, persist_to=-1, replicate_to=-1, timeout=0.0):
          
          return DurabilityContext(self, persist_to, replicate_to, timeout)
docs: Returns a context manager which will apply the given
          persistence/replication settings to all mutation operations when
          active
  
          :param int persist_to:
          :param int replicate_to:
  
          See :meth:`endure` for the meaning of these two values
  
          Thus, something like::
  
            with cb.durability(persist_to=3):
              cb.upsert("foo", "foo_value")
              cb.upsert("bar", "bar_value")
              cb.upsert("baz", "baz_value")
  
          is equivalent to::
  
              cb.upsert("foo", "foo_value", persist_to=3)
              cb.upsert("bar", "bar_value", persist_to=3)
              cb.upsert("baz", "baz_value", persist_to=3)
  
  
          .. versionadded:: 1.2.0
  
          .. seealso:: :meth:`endure`