code: def __init__(self, tolerance_window: int) -> None:
      self._tolerance_window: int = tolerance_window
      self._best_value: tp.Optional[np.ndarray] = None
      self._tolerance_count: int = 0
  
imports: import json
  import time
  import warnings
  import inspect
  import datetime
  import logging
  from pathlib import Path
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.parametrization import parameter
  from nevergrad.parametrization import helpers
  from .None import base
label_desc: Use image node_id 1 to create a new _LossImprovementToleranceCriterion object  with example: obj = _LossImprovementToleranceCriterion(tolerance_window)