code: def diff_safe(cls, value):
          
          if isinstance(value, Frame):
              return {'_str': str(value), '_id': value._id}
          elif isinstance(value, (list, tuple)):
              return [cls.diff_safe(v) for v in value]
          return value
docs: Return a value that can be safely stored as a diff