code: def compare_safe(cls, value):
          
  
          # Date
          if type(value) == date:
              return str(value)
  
          # Lists
          elif isinstance(value, (list, tuple)):
              return [cls.compare_safe(v) for v in value]
  
          # Dictionaries
          elif isinstance(value, dict):
              return {k: cls.compare_safe(v) for k, v in value.items()}
  
          return value
docs: Return a value that can be safely compared