class_docstr: Basic in-memory dict-based object for saving Task Records.
  
  This is the first object to present the DB interface
  for logging tasks out of memory.
  
  The interface is based on MongoDB, so adding a MongoDB
  backend should be straightforward.
code: def _check_dates(self, rec):
      for key in ("submitted", "started", "completed", "received"):
          value = rec.get(key, None)
          if value is not None and not isinstance(value, datetime):
              raise ValueError(
                  f"{key} must be None or datetime, not {value!r}"
              )
          if isinstance(value, datetime) and value.tzinfo is None:
              self.log.warning(
                  "Timestamps should always have timezones: %s=%s",
                  key,
                  value,
              )
              rec[key] = ensure_timezone(value)
  
imports: import copy
  from copy import deepcopy
  from datetime import datetime
  from traitlets import Dict, Float, Integer, Unicode
  from traitlets.config.configurable import LoggingConfigurable
  from ..util import ensure_timezone
label_desc: Use image node_id 8 for calling the DictDB obj's underlying member method code with example usage: obj._check_dates(rec) without return types