docs: def is_lagging(self, wal_position):
          """Returns if instance with an wal should consider itself unhealthy to be promoted due to replication lag.
  
          :param wal_position: Current wal position.
          :returns True when node is lagging
          """
          lag = (self.cluster.last_leader_operation or 0) - wal_position
          return lag > self.patroni.config.get('maximum_lag_on_failover', 0)