class_docstr: CheckIn is a dataclass that represents a single check-in.
  
  All the time-related fields are in `time.monotonic`, relative time expressed in
  seconds, until stated otherwise. In case of `expect_next_in=0` we treat it as
  a special case, meaning that the check-in is not expected to expire.
  Indicies are used to identify check-ins and are unique within a run, auto-incremented.
docstr: The check-in `expect_next_in` is counted from the time the check-in was
  first created / seen.
  
  As the `CheckIn` objects are designed to be immutable, we need to
  recalibrate the time when the check-in is expected to expire, returning
  a new `CheckIn` object.
docstr_tok: ["The","check-in","`","expect_next_in","`","is","counted","from","the","time","the","check-in","was","first","created","\/","seen",".","As","the","`","CheckIn","`","objects","are","designed","to","be","immutable",",","we","need","to","recalibrate","the","time","when","the","check-in","is","expected","to","expire",",","returning","a","new","`","CheckIn","`","object","."]
code: def time_calibrated(self):
      """
      The check-in `expect_next_in` is counted from the time the check-in was
      first created / seen.
  
      As the `CheckIn` objects are designed to be immutable, we need to
      recalibrate the time when the check-in is expected to expire, returning
      a new `CheckIn` object.
      """
      now = time.monotonic()
      if self.expect_next_in == 0:
          expect_next_in = 0
      else:
          expect_next_in = max(1, math.ceil(self.expiry_date - now))
      new = CheckIn(
          idx=self.idx,
          expect_next_in=expect_next_in,
          first_seen=now,
          flag_name=self.flag_name,
      )
      logger.debug(f"calibrated check-in: {self} -> {new}")
      return new
  
imports: import math
  import time
  import queue
  import threading
  from collections import defaultdict
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import ClassVar, Dict, Optional, Tuple, Set, Union, TYPE_CHECKING
  from cachetools import LRUCache
  from aim.sdk.reporter.file_manager import FileManager
  import logging
label_desc: Use image node_id 6 for calling the CheckIn obj's underlying member method code with example usage: obj.time_calibrated() and returns: new