code: def ensure_routing_table_is_fresh(self, access_mode):
          
          if self.routing_table.is_fresh(access_mode):
              return False
          with self.refresh_lock:
              if self.routing_table.is_fresh(access_mode):
                  if access_mode == READ_ACCESS:
                      # if reader is fresh but writers is not fresh, then we are reading in absence of writer
                      self.missing_writer = not self.routing_table.is_fresh(WRITE_ACCESS)
                  return False
              self.update_routing_table()
              self.update_connection_pool()
              return True
docs: Update the routing table if stale.
  
          This method performs two freshness checks, before and after acquiring
          the refresh lock. If the routing table is already fresh on entry, the
          method exits immediately; otherwise, the refresh lock is acquired and
          the second freshness check that follows determines whether an update
          is still required.
  
          This method is thread-safe.
  
          :return: `True` if an update was required, `False` otherwise.