def _should_load_state_from_peers(self) -> bool:
    '\n        If true, peer will discard local progress and attempt to download state from peers.\n        This method allows peer to continue training in two cases:\n         - peer is on the same epoch as other collaborators - keep training normally\n         - peer was on the same epoch and accumulated some grads, but some collaborators\n             have just transitioned to the next epoch - this peer should also transition.\n\n        :note: The latter case occurs due to the lack of network synchrony: the first peer that\n        detects enough samples will transition to the next step and start counting samples anew.\n        Some other peers may take time before they check with DHT and observe that\n          - the global epoch is technically one epoch ahead of the current one and\n          - the remaining (non-transitioned) peers no longer have target_batch_size between them\n        If this is the case, peer should transition to the next epoch and does *not* need to re-load state.\n        '
    if (self._should_check_synchronization_on_update and self.tracker.fetched_global_progress_this_epoch.is_set()):
        self._should_check_synchronization_on_update = False
        return (self.local_epoch != self.tracker.global_epoch)
    return (self.local_epoch < (self.tracker.global_epoch - 1))
If true, peer will discard local progress and attempt to download state from peers.
This method allows peer to continue training in two cases:
 - peer is on the same epoch as other collaborators - keep training normally
 - peer was on the same epoch and accumulated some grads, but some collaborators
     have just transitioned to the next epoch - this peer should also transition.

:note: The latter case occurs due to the lack of network synchrony: the first peer that
detects enough samples will transition to the next step and start counting samples anew.
Some other peers may take time before they check with DHT and observe that
  - the global epoch is technically one epoch ahead of the current one and
  - the remaining (non-transitioned) peers no longer have target_batch_size between them
If this is the case, peer should transition to the next epoch and does *not* need to re-load state.
def _should_load_state_from_peers(self) -> bool:
    '\n        If true, peer will discard local progress and attempt to download state from peers.\n        This method allows peer to continue training in two cases:\n         - peer is on the same epoch as other collaborators - keep training normally\n         - peer was on the same epoch and accumulated some grads, but some collaborators\n             have just transitioned to the next epoch - this peer should also transition.\n\n        :note: The latter case occurs due to the lack of network synchrony: the first peer that\n        detects enough samples will transition to the next step and start counting samples anew.\n        Some other peers may take time before they check with DHT and observe that\n          - the global epoch is technically one epoch ahead of the current one and\n          - the remaining (non-transitioned) peers no longer have target_batch_size between them\n        If this is the case, peer should transition to the next epoch and does *not* need to re-load state.\n        '
    if (self._should_check_synchronization_on_update and self.tracker.fetched_global_progress_this_epoch.is_set()):
        self._should_check_synchronization_on_update = False
        return (self.local_epoch != self.tracker.global_epoch)
    return (self.local_epoch < (self.tracker.global_epoch - 1))