code: def take_snapshot(obj, store=True, **kw):
      
      logger.debug("📷 Take new snapshot for {}".format(repr(obj)))
  
      # get the object data
      snapshot = get_object_data(obj)
  
      # get the metadata
      metadata = get_object_metadata(obj, **kw)
  
      # store the metadata
      snapshot["__metadata__"] = metadata
  
      # convert the snapshot to JSON
      data = json.dumps(snapshot)
  
      # return immediately
      if not store:
          return snapshot
  
      # get the snapshot storage
      storage = get_storage(obj)
  
      # store the snapshot data
      storage.append(data)
  
      # Mark the content as auditable
      alsoProvides(obj, IAuditable)
  
      return snapshot
docs: Takes a snapshot of the passed in object
  
      :param obj: Content object
      :returns: New snapshot