class_docstr: An atomic, thread-safe incrementing counter.
  
  Based on:
  https://gist.github.com/benhoyt/8c8a8d62debe8e5aa5340373f9c509c7
class_docstr_tok: ["An","atomic",",","thread-safe","incrementing","counter",".","Based","on",":","https",":","\/\/gist.github.com\/benhoyt\/8c8a8d62debe8e5aa5340373f9c509c7"]
docstr: Atomically increment the counter by 1 and return the
  previous value.
docstr_tok: ["Atomically","increment","the","counter","by","1","and","return","the","previous","value","."]
code: def increment(self):
      """
      Atomically increment the counter by 1 and return the
      previous value.
      """
      with self._lock:
          prev_value = self.value
          self.value += 1
          return prev_value
  
file_path: avalanche/avalanche/benchmarks/utils/ffcv_support/ffcv_epoch_iterator.py
imports: from threading import Thread, Event, Lock
  from queue import Queue
  from typing import List, Sequence, TYPE_CHECKING
  from ffcv.traversal_order.quasi_random import QuasiRandom
  from ffcv.loader.epoch_iterator import EpochIterator, QUASIRANDOM_ERROR_MSG
  import torch
label_desc: Use image node_id 2 for calling the AtomicCounter obj's underlying member method code with example usage: obj.increment() and returns: prev_value