code: def serialize(self):
          
          try:
              return jsonpickle.encode(self, unpicklable=False)
          except Exception:
              log.exception("got an exception during serialization")
docs: Serialize to JSON document that can be accepted by the
          X-Ray backend service. It uses jsonpickle to perform
          serialization.