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.
docstr: extract subdict of keys
docstr_tok: ["extract","subdict","of","keys"]
code: def _extract_subdict(self, rec, keys):
      """extract subdict of keys"""
      d = {}
      d["msg_id"] = rec["msg_id"]
      for key in keys:
          d[key] = rec[key]
      return deepcopy(d)
  
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 3 for calling the DictDB obj's underlying member method code with example usage: obj._extract_subdict(rec, keys) and returns: deepcopy