docs: def serialize(self, o):
          '''
          Returns a safe serializable object that can be serialized into JSON.
  
          @param o Python object to serialize
          '''
          if isinstance(o, (list, tuple)):
              return [self.serialize(i) for i in o]
          if isinstance(o, dict):
              return {k: self.serialize(v) for k, v in o.items()}
          if isinstance(o, datetime):
              return o.isoformat()
          if isinstance(o, Result):
              return self.serialize(o.serialize())
          return o