class_docstr: Custom fixed size list that only supports right-append and ensures that all values increase monotonically.
code: def append(self, x: T) -> None:
      last = self.last
      if last is not None and last >= x:
          raise ValueError(
              f"Expected the value to increase, last: {last}, current: {x}"
          )
      list.append(self, x)
      # truncate excess
      if len(self) > self.maxlen:
          del self[0]
  
imports: from collections import deque
  from typing import TYPE_CHECKING, Any, Callable, Deque, Dict, List, Optional, TypeVar, Union
  import torch
  from typing_extensions import override
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_2_1
  from lightning.fabric.utilities.rank_zero import rank_zero_only, rank_zero_warn
label_desc: Use image node_id 3 for calling the _MonotonicWindow obj's underlying member method code with example usage: obj.append(x) without return types