code: def persistent_id(self, obj):
      # Instead of pickling MemoRecord as a regular class instance, we emit a
      # persistent ID.
      if isinstance(obj, MemoRecord):
          # Here, our persistent ID is simply a tuple, containing a tag and a
          # key, which refers to a specific record in the database.
          return ("MemoRecord", obj.key)
      else:
          # If obj does not have a persistent ID, return None. This means obj
          # needs to be pickled as usual.
          return None
  
file_path: cpython/Doc/includes/dbpickle.py
imports: import pickle
  import sqlite3
  from collections import namedtuple
label_desc: Use image node_id 1 for calling the DBPickler obj's underlying member method code with example usage: obj.persistent_id(obj) and returns: str,  obj, None