code: def serialize(self):
          
          converted_dict = {
              'success': self.success,
              'assertion': str(self),
              'required': self.required
          }
          return converted_dict
docs: Serializes the ExpectAssert object for collection.
  
          Warning, this will only grab the available information.
          It is strongly that you only call this once all specs and
          tests have completed.